Fixed the 'cf_cli' bundle. Added new bundles 'bosh_cli" and 'cf_tools'.
This commit is contained in:
parent
7ee38a2e5c
commit
e7bed86b9c
10
src/.config
10
src/.config
@ -45,7 +45,13 @@ SYSLINUX_SOURCE_URL=http://kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.0
|
|||||||
#
|
#
|
||||||
# http://github.com/cloudfoundry/cli
|
# http://github.com/cloudfoundry/cli
|
||||||
#
|
#
|
||||||
CLOUD_FOUNDRY_CLI_URL=http://cli.run.pivotal.io/stable?release=linux64-binary&source=github
|
BOSH_CLI_URL=https://s3.amazonaws.com/bosh-cli-artifacts/bosh-cli-2.0.45-linux-amd64
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
# You can find the latest coreutils source bundles here:
|
# You can find the latest coreutils source bundles here:
|
||||||
#
|
#
|
||||||
@ -230,7 +236,9 @@ OVERLAY_TYPE=folder
|
|||||||
# Currently available overlay software:
|
# Currently available overlay software:
|
||||||
#
|
#
|
||||||
# glibc_full - all core GNU C libraries (useful if other software is included).
|
# glibc_full - all core GNU C libraries (useful if other software is included).
|
||||||
|
# bosh_cli - BOSH CLI (command line interface).
|
||||||
# cf_cli - Cloud Foundry CLI (command line interface).
|
# cf_cli - Cloud Foundry CLI (command line interface).
|
||||||
|
# cf_tools - all BOSH and CLoud Foundry tools.
|
||||||
# coreutils - set of commonly used GNU executable utilities.
|
# coreutils - set of commonly used GNU executable utilities.
|
||||||
# dhcp - DHCP and DNS functionality.
|
# dhcp - DHCP and DNS functionality.
|
||||||
# dialog - shell scripting for ncurses
|
# dialog - shell scripting for ncurses
|
||||||
|
14
src/README
14
src/README
@ -27,6 +27,20 @@ Currently available overlay bundles:
|
|||||||
|
|
||||||
This overlay bundle depends on the GLIBC build process.
|
This overlay bundle depends on the GLIBC build process.
|
||||||
|
|
||||||
|
* bosh_cli - BOSH command line tool. It can be used as landscape manager for
|
||||||
|
virtual network and server infrastructures in cloud environment,
|
||||||
|
e.g. AWS, Google Cloud, etc. The most common use case for this
|
||||||
|
tool is to create and manage Cloud Foundry infrastructures.
|
||||||
|
|
||||||
|
* cf_cli - Cloud Foundry command line tool. It can be used to manage all
|
||||||
|
aspects of already existing Cloud Foundry installation, including
|
||||||
|
the full software development lifecycle in cloud environment.
|
||||||
|
|
||||||
|
* cf_tools - This is metapackage which installs all BOSH and Cloud Foundry
|
||||||
|
tools. Note that in MLL context these tools are mostly useful
|
||||||
|
as remote managers for already existing BOSH and Cloud Foundry
|
||||||
|
cloud infrastructures.
|
||||||
|
|
||||||
* coreutils - Set of commonly used GNU executable utilities.
|
* coreutils - Set of commonly used GNU executable utilities.
|
||||||
|
|
||||||
* dhcp - DHCP and DNS functionality to connect to the Internet.
|
* dhcp - DHCP and DNS functionality to connect to the Internet.
|
||||||
|
34
src/minimal_overlay/bundles/bosh_cli/01_get.sh
Executable file
34
src/minimal_overlay/bundles/bosh_cli/01_get.sh
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Grab everything after the '=' character.
|
||||||
|
DOWNLOAD_URL=`grep -i ^BOSH_CLI_URL= $CONFIG | cut -f2- -d'=' | xargs`
|
||||||
|
|
||||||
|
# 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/bosh-cli ] ; then
|
||||||
|
echo "Shell script '$MAIN_SRC_DIR/source/overlay/bosh-cli' is missing and will be downloaded."
|
||||||
|
USE_LOCAL_SOURCE="false"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $MAIN_SRC_DIR/source/overlay
|
||||||
|
|
||||||
|
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
|
||||||
|
# Downloading BOSH CLI binary. The '-c' option allows the download to resume.
|
||||||
|
echo "Downloading BOSH CLI binary from $DOWNLOAD_URL"
|
||||||
|
wget -O bosh-cli -c $DOWNLOAD_URL
|
||||||
|
else
|
||||||
|
echo "Using local BOSH CLI binary '$MAIN_SRC_DIR/source/overlay/bosh-cli'."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Delete folder with previously prepared BOSH CLI.
|
||||||
|
echo "Removing BOSH CLI work area. This may take a while."
|
||||||
|
rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
|
||||||
|
mkdir $WORK_DIR/overlay/$BUNDLE_NAME
|
||||||
|
|
||||||
|
# Copy bosh-cli to folder 'work/overlay/bosh_cli'.
|
||||||
|
cp bosh-cli $WORK_DIR/overlay/$BUNDLE_NAME
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
27
src/minimal_overlay/bundles/bosh_cli/02_install.sh
Executable file
27
src/minimal_overlay/bundles/bosh_cli/02_install.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Removing old 'BOSH CLI' artifacts. This may take a while."
|
||||||
|
rm -rf $DEST_DIR
|
||||||
|
mkdir -p $DEST_DIR/opt/$BUNDLE_NAME
|
||||||
|
mkdir -p $DEST_DIR/usr/bin
|
||||||
|
|
||||||
|
cd $DEST_DIR
|
||||||
|
|
||||||
|
cp $MAIN_SRC_DIR/source/overlay/bosh-cli opt/$BUNDLE_NAME/bosh
|
||||||
|
|
||||||
|
chmod +rx opt/$BUNDLE_NAME/bosh
|
||||||
|
|
||||||
|
cd $DEST_DIR/usr/bin
|
||||||
|
|
||||||
|
ln -s ../../opt/$BUNDLE_NAME/bosh bosh
|
||||||
|
|
||||||
|
# With '--remove-destination' all possibly existing soft links in
|
||||||
|
# '$OVERLAY_ROOTFS' will be overwritten correctly.
|
||||||
|
cp -r --remove-destination $DEST_DIR/* \
|
||||||
|
$OVERLAY_ROOTFS
|
||||||
|
|
||||||
|
echo "Bundle 'BOSH CLI' has been installed."
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
10
src/minimal_overlay/bundles/bosh_cli/bundle.sh
Executable file
10
src/minimal_overlay/bundles/bosh_cli/bundle.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ../../common.sh
|
||||||
|
|
||||||
|
./01_get.sh
|
||||||
|
./02_install.sh
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
@ -2,12 +2,8 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
. ../../common.sh
|
|
||||||
|
|
||||||
# Grab everything after the '=' character.
|
# Grab everything after the '=' character.
|
||||||
#DOWNLOAD_URL=$(grep -i CLOUD_FOUNDRY_CLI_URL $MAIN_SRC_DIR/.config | cut -f2 -d'=')
|
DOWNLOAD_URL=`grep -i ^CLOUD_FOUNDRY_CLI_URL= $CONFIG | cut -f2- -d'=' | xargs`
|
||||||
# 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'
|
# Read the 'USE_LOCAL_SOURCE' property from '.config'
|
||||||
USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE $MAIN_SRC_DIR/.config | cut -f2 -d'=')"
|
USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE $MAIN_SRC_DIR/.config | cut -f2 -d'=')"
|
||||||
|
@ -2,12 +2,10 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
. ../../common.sh
|
echo "Removing old 'Cloud Foundry CLI' artifacts. This may take a while."
|
||||||
|
|
||||||
echo "Removing old cloud foundry artifacts. This may take a while."
|
|
||||||
rm -rf $DEST_DIR
|
rm -rf $DEST_DIR
|
||||||
mkdir -p $DEST_DIR/opt/$BUNDLE_NAME
|
mkdir -p $DEST_DIR/opt/$BUNDLE_NAME
|
||||||
mkdir -p $DEST_DIR/bin
|
mkdir -p $DEST_DIR/usr/bin
|
||||||
|
|
||||||
cd $WORK_DIR/overlay/$BUNDLE_NAME
|
cd $WORK_DIR/overlay/$BUNDLE_NAME
|
||||||
|
|
||||||
@ -19,15 +17,15 @@ chmod +rx cf
|
|||||||
|
|
||||||
cp cf $DEST_DIR/opt/$BUNDLE_NAME/cf
|
cp cf $DEST_DIR/opt/$BUNDLE_NAME/cf
|
||||||
|
|
||||||
cd $DEST_DIR
|
cd $DEST_DIR/usr/bin
|
||||||
|
|
||||||
ln -s ../opt/$BUNDLE_NAME/cf bin/cf
|
ln -s ../../opt/$BUNDLE_NAME/cf cf
|
||||||
|
|
||||||
# With '--remove-destination' all possibly existing soft links in
|
# With '--remove-destination' all possibly existing soft links in
|
||||||
# '$OVERLAY_ROOTFS' will be overwritten correctly.
|
# '$OVERLAY_ROOTFS' will be overwritten correctly.
|
||||||
cp -r --remove-destination $DEST_DIR/* \
|
cp -r --remove-destination $DEST_DIR/* \
|
||||||
$OVERLAY_ROOTFS
|
$OVERLAY_ROOTFS
|
||||||
|
|
||||||
echo "Cloud Foundry CLI has been installed."
|
echo "Bundle 'Cloud Foundry CLI' has been installed."
|
||||||
|
|
||||||
cd $SRC_DIR
|
cd $SRC_DIR
|
||||||
|
5
src/minimal_overlay/bundles/cf_tools/bundle.sh
Executable file
5
src/minimal_overlay/bundles/cf_tools/bundle.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "All BOSH and Cloud Foundry tools have been installed."
|
2
src/minimal_overlay/bundles/cf_tools/bundle_deps
Normal file
2
src/minimal_overlay/bundles/cf_tools/bundle_deps
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
bosh_cli
|
||||||
|
cf_cli
|
Loading…
x
Reference in New Issue
Block a user