Update DIB element and build scripts for akanda->astara.
Also enables Nginx LB in the published image. Change-Id: I9f6f8288a9d40ec9d199c565278688a1a94fff14
This commit is contained in:
parent
409c3057da
commit
8667a618b0
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
DIB_AKANDA_ADVANCED_SERVICES=${DIB_AKANDA_ADVANCED_SERVICES:-"router"}
|
||||
|
||||
APP_SRC_DIR="/tmp/akanda-appliance"
|
||||
|
||||
[ -d "${APP_SRC_DIR}" ] || exit 0
|
||||
|
||||
ansible-playbook -i "localhost," -c local -e enabled_advanced_services="$DIB_AKANDA_ADVANCED_SERVICES" $APP_SRC_DIR/ansible/main.yml
|
@ -1 +0,0 @@
|
||||
akanda git /tmp/akanda-appliance https://github.com/stackforge/akanda-appliance.git
|
11
diskimage-builder/elements/astara/install.d/astara-source-install/70-astara
Executable file
11
diskimage-builder/elements/astara/install.d/astara-source-install/70-astara
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
DIB_ASTARA_ADVANCED_SERVICES=${DIB_ASTARA_ADVANCED_SERVICES:-"router"}
|
||||
|
||||
APP_SRC_DIR="/tmp/astara-appliance"
|
||||
|
||||
[ -d "${APP_SRC_DIR}" ] || exit 0
|
||||
|
||||
ansible-playbook -i "localhost," -c local -e enabled_advanced_services="$DIB_ASTARA_ADVANCED_SERVICES" $APP_SRC_DIR/ansible/main.yml
|
@ -0,0 +1 @@
|
||||
astara git /tmp/astara-appliance https://github.com/openstack/astara-appliance.git
|
@ -6,5 +6,5 @@ to authenticate using a SSH public key. This element should only be included
|
||||
when building images for develoment environments.
|
||||
|
||||
The username and password can be set in the build environment as
|
||||
$DIB_AKANDA_APPLIANCE_DEBUG_USER and $DIB_AKANDA_APPLIANCE_DEBUG_PASSWORD
|
||||
$DIB_ASTARA_APPLIANCE_DEBUG_USER and $DIB_ASTARA_APPLIANCE_DEBUG_PASSWORD
|
||||
The defaults are akanda-debug/akanda.
|
||||
|
@ -1,21 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIB_AKANDA_APPLIANCE_DEBUG_USER=${DIB_AKANDA_APPLIANCE_DEBUG_USER:-akanda-debug}
|
||||
DIB_AKANDA_APPLIANCE_DEBUG_PASSWORD=${DIB_AKANDA_APPLIANCE_DEBUG_PASSWORD:-akanda}
|
||||
DIB_ASTARA_APPLIANCE_DEBUG_USER=${DIB_ASTARA_APPLIANCE_DEBUG_USER:-astara-debug}
|
||||
DIB_ASTARA_APPLIANCE_DEBUG_PASSWORD=${DIB_ASTARA_APPLIANCE_DEBUG_PASSWORD:-astara}
|
||||
|
||||
set -eu
|
||||
set -o xtrace
|
||||
|
||||
useradd -m $DIB_AKANDA_APPLIANCE_DEBUG_USER -s /bin/bash
|
||||
useradd -m $DIB_ASTARA_APPLIANCE_DEBUG_USER -s /bin/bash
|
||||
|
||||
passwd $DIB_AKANDA_APPLIANCE_DEBUG_USER <<EOF
|
||||
$DIB_AKANDA_APPLIANCE_DEBUG_PASSWORD
|
||||
$DIB_AKANDA_APPLIANCE_DEBUG_PASSWORD
|
||||
passwd $DIB_ASTARA_APPLIANCE_DEBUG_USER <<EOF
|
||||
$DIB_ASTARA_APPLIANCE_DEBUG_PASSWORD
|
||||
$DIB_ASTARA_APPLIANCE_DEBUG_PASSWORD
|
||||
EOF
|
||||
|
||||
cat > /etc/sudoers.d/akanda-debug-user <<eof
|
||||
$DIB_AKANDA_APPLIANCE_DEBUG_USER ALL=(ALL) NOPASSWD:ALL
|
||||
cat > /etc/sudoers.d/astara-debug-user <<eof
|
||||
$DIB_ASTARA_APPLIANCE_DEBUG_USER ALL=(ALL) NOPASSWD:ALL
|
||||
eof
|
||||
|
||||
chmod 0440 /etc/sudoers.d/akanda-debug-user
|
||||
chmod 0440 /etc/sudoers.d/astara-debug-user
|
||||
visudo -c
|
||||
|
@ -15,21 +15,22 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# This builds an akanda appliance VM image at
|
||||
# $SRC_ROOT/build/akanda_appliance.qcow2, containing the akanda-appliance code
|
||||
# This builds an astara appliance VM image at
|
||||
# $SRC_ROOT/build/astara_appliance.qcow2, containing the astara-appliance code
|
||||
# as it is currently checked out in this local repository.
|
||||
|
||||
SRC_ROOT="$(dirname $0)/.."
|
||||
IMG_OUT=$SRC_ROOT/build/akanda_appliance
|
||||
IMG_OUT=$SRC_ROOT/build/astara_appliance
|
||||
|
||||
AKANDA_DEBIAN_RELEASE=${AKANDA_DEBIAN_RELEASE:-"jessie"}
|
||||
BASE_ELEMENTS="vm debian akanda"
|
||||
BASE_ELEMENTS="vm debian astara nginx"
|
||||
EXTRA_ELEMENTS="$@"
|
||||
|
||||
GIT_HEAD="$(cd $SRC_ROOT && git rev-parse HEAD^)"
|
||||
|
||||
DIB_REPOLOCATION_akanda=$SRC_ROOT \
|
||||
DIB_REPOREF_akanda=$GIT_HEAD \
|
||||
DIB_REPOLOCATION_astara=$SRC_ROOT \
|
||||
DIB_REPOREF_astara=$GIT_HEAD \
|
||||
ELEMENTS_PATH=$SRC_ROOT/diskimage-builder/elements \
|
||||
DIB_RELEASE=$AKANDA_DEBIAN_RELEASE DIB_EXTLINUX=1 \
|
||||
DIB_ASTARA_ADVANCED_SERVICES="router,loadbalancer" \
|
||||
disk-image-create $BASE_ELEMENTS $EXTRA_ELEMENTS -o $IMG_OUT
|
||||
|
Loading…
x
Reference in New Issue
Block a user