Added 'Cloud Foundry' command line interface as overlay bundle.
This commit is contained in:
parent
c2e50f8fb5
commit
b580f0e731
10
src/.config
10
src/.config
@ -80,6 +80,11 @@ LUA_SOURCE_URL=https://www.lua.org/ftp/lua-5.3.4.tar.gz
|
|||||||
#
|
#
|
||||||
STATIC_GET_SOURCE_URL=http://s.minos.io/s
|
STATIC_GET_SOURCE_URL=http://s.minos.io/s
|
||||||
|
|
||||||
|
# You can find the latest Cloud Foundry CLI binary here:
|
||||||
|
#
|
||||||
|
# http://github.com/cloudfoundry/cli
|
||||||
|
#
|
||||||
|
CLOUD_FOUNDRY_CLI_URL=http://cli.run.pivotal.io/stable?release=linux64-binary&source=github
|
||||||
|
|
||||||
|
|
||||||
####################################################
|
####################################################
|
||||||
@ -165,11 +170,12 @@ COPY_SOURCE_ISO=true
|
|||||||
# mll_utils - set of executable utilities (mll-*).
|
# mll_utils - set of executable utilities (mll-*).
|
||||||
# lua - scripting language
|
# lua - scripting language
|
||||||
# static_get - portable binaries for Linux (http://s.minos.io)
|
# static_get - portable binaries for Linux (http://s.minos.io)
|
||||||
|
# cf_cli - CLoud Foundry CLI (command line interface)
|
||||||
#
|
#
|
||||||
# Refer to the README file for more information.
|
# Refer to the README file for more information.
|
||||||
#
|
#
|
||||||
#OVERLAY_BUNDLES=glibc_full,links,dropbear,java,felix,mll_utils,lua
|
#OVERLAY_BUNDLES=glibc_full,links,dropbear,java,felix,mll_utils,lua,static_get,cf_cli
|
||||||
#OVERLAY_BUNDLES=static_get
|
#OVERLAY_BUNDLES=cf_cli
|
||||||
|
|
||||||
# This property enables the standard penguin boot logo in the upper left corner
|
# This property enables the standard penguin boot logo in the upper left corner
|
||||||
# of the screen. The property is used in 'xx_build_kernel.sh'. The default value
|
# of the screen. The property is used in 'xx_build_kernel.sh'. The default value
|
||||||
|
42
src/minimal_overlay/bundles/cf_cli/01_get.sh
Executable file
42
src/minimal_overlay/bundles/cf_cli/01_get.sh
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SRC_DIR=$(pwd)
|
||||||
|
|
||||||
|
# Find the main source directory
|
||||||
|
cd ../../..
|
||||||
|
MAIN_SRC_DIR=$(pwd)
|
||||||
|
cd $SRC_DIR
|
||||||
|
|
||||||
|
# Grab everything after the '=' character.
|
||||||
|
#DOWNLOAD_URL=$(grep -i CLOUD_FOUNDRY_CLI_URL $MAIN_SRC_DIR/.config | cut -f2 -d'=')
|
||||||
|
# TODO - hardcoding for now
|
||||||
|
DOWNLOAD_URL="http://cli.run.pivotal.io/stable?release=linux64-binary&source=github"
|
||||||
|
|
||||||
|
# Read the 'USE_LOCAL_SOURCE' property from '.config'
|
||||||
|
USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE $MAIN_SRC_DIR/.config | cut -f2 -d'=')"
|
||||||
|
|
||||||
|
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/cf-cli.tgz ] ; then
|
||||||
|
echo "Shell script $MAIN_SRC_DIR/source/overlay/cf-cli.tgz is missing and will be downloaded."
|
||||||
|
USE_LOCAL_SOURCE="false"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $MAIN_SRC_DIR/source/overlay
|
||||||
|
|
||||||
|
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
|
||||||
|
# Downloading cloud foundry compressed binary archive. The '-c' option allows the download to resume.
|
||||||
|
echo "Downloading cloud foundry compressed binary archive from $DOWNLOAD_URL"
|
||||||
|
wget -O cf-cli.tgz -c $DOWNLOAD_URL
|
||||||
|
else
|
||||||
|
echo "Using local cloud foundry compressed binary archive $MAIN_SRC_DIR/source/overlay/cf-cli.tgz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Delete folder with previously prepared cloud foundry cli.
|
||||||
|
echo "Removing cloud foundry cli work area. This may take a while..."
|
||||||
|
rm -rf ../../work/overlay/clofo
|
||||||
|
mkdir ../../work/overlay/clofo
|
||||||
|
|
||||||
|
# Copy cf-cli.tgz to folder 'work/overlay/clofo'.
|
||||||
|
cp cf-cli.tgz ../../work/overlay/clofo
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
||||||
|
|
35
src/minimal_overlay/bundles/cf_cli/02_install.sh
Executable file
35
src/minimal_overlay/bundles/cf_cli/02_install.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SRC_DIR=$(pwd)
|
||||||
|
|
||||||
|
# Find the main source directory
|
||||||
|
cd ../../..
|
||||||
|
MAIN_SRC_DIR=$(pwd)
|
||||||
|
cd $SRC_DIR
|
||||||
|
|
||||||
|
echo "Removing old cloud foundry artifacts. This may take a while..."
|
||||||
|
rm -rf $MAIN_SRC_DIR/work/overlay/clofo/clofo_installed
|
||||||
|
mkdir -p $MAIN_SRC_DIR/work/overlay/clofo/clofo_installed/opt/clofo
|
||||||
|
mkdir -p $MAIN_SRC_DIR/work/overlay/clofo/clofo_installed/bin
|
||||||
|
|
||||||
|
cd $MAIN_SRC_DIR/work/overlay/clofo
|
||||||
|
|
||||||
|
cp $MAIN_SRC_DIR/source/overlay/cf-cli.tgz .
|
||||||
|
|
||||||
|
tar -xvf cf-cli.tgz
|
||||||
|
rm -f LICENSE NOTICE cf-cli.tgz
|
||||||
|
chmod +rx cf
|
||||||
|
|
||||||
|
cp cf $MAIN_SRC_DIR/work/overlay/clofo/clofo_installed/opt/clofo/cf
|
||||||
|
|
||||||
|
cd $MAIN_SRC_DIR/work/overlay/clofo/clofo_installed
|
||||||
|
|
||||||
|
ln -s ../opt/clofo/cf bin/cf
|
||||||
|
|
||||||
|
cp -r $MAIN_SRC_DIR/work/overlay/clofo/clofo_installed/* \
|
||||||
|
$MAIN_SRC_DIR/work/src/minimal_overlay/rootfs
|
||||||
|
|
||||||
|
echo "cloud foundry cli has been installed."
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
||||||
|
|
9
src/minimal_overlay/bundles/cf_cli/bundle.sh
Executable file
9
src/minimal_overlay/bundles/cf_cli/bundle.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SRC_DIR=$(pwd)
|
||||||
|
|
||||||
|
time sh 01_get.sh
|
||||||
|
time sh 02_install.sh
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user