From 448177c3b944bf0913cc29d81f91fce7f7b930c4 Mon Sep 17 00:00:00 2001 From: Sebastian Rieger Date: Thu, 16 May 2024 10:35:56 +0200 Subject: [PATCH] updated aws ami and aws cloud-init script for demo4 --- example-projects/demo3-microservice-in-aws.py | 1 - example-projects/demo4-scale-out-lb-in-aws.py | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/example-projects/demo3-microservice-in-aws.py b/example-projects/demo3-microservice-in-aws.py index d0289d0..23af54f 100644 --- a/example-projects/demo3-microservice-in-aws.py +++ b/example-projects/demo3-microservice-in-aws.py @@ -16,7 +16,6 @@ home = expanduser("~") # The image to look for and use for the started instance # aws ec2 describe-images --owner amazon | grep ubuntu | grep jammy | grep hvm | grep ssd |grep amd64 | grep -v minimal | grep -v pro | grep -v testing | grep -v k8s | grep "Name" ubuntu_image_name = 'ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20240319' -# TODO: 18.04, currently still needed for faafo, need to port faafo demo app to 20.04 or higher and python3... # The public key to be used for SSH connection, please make sure, that you have the corresponding private key diff --git a/example-projects/demo4-scale-out-lb-in-aws.py b/example-projects/demo4-scale-out-lb-in-aws.py index 38c8f3e..d53c2d4 100644 --- a/example-projects/demo4-scale-out-lb-in-aws.py +++ b/example-projects/demo4-scale-out-lb-in-aws.py @@ -21,9 +21,9 @@ home = expanduser("~") # 1 (Classic) Elastic Load Balancer, expensive! delete it after you used it! # The image to look for and use for the started instance -ubuntu_image_name = 'ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20210128' +# aws ec2 describe-images --owner amazon | grep ubuntu | grep jammy | grep hvm | grep ssd |grep amd64 | grep -v minimal | grep -v pro | grep -v testing | grep -v k8s | grep "Name" +ubuntu_image_name = 'ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20240319' # ubuntu_image_name = 'ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20210128' -# TODO: 18.04, currently still needed for faafo, need to port faafo demo app to 20.04 or higher and python3... # The public key to be used for SSH connection, please make sure, that you have the corresponding private key @@ -284,14 +284,14 @@ def main(): # ########################################################################### - # https://git.openstack.org/cgit/openstack/faafo/plain/contrib/install.sh + # https://git.openstack.org/cgit/openstack/faafo/plain/contrib/install-aws.sh # is currently broken, hence the "rabbitctl" lines were added in the example # below, see also https://bugs.launchpad.net/faafo/+bug/1679710 # # Thanks to Stefan Friedmann for finding this fix ;) userdata_service = '''#!/usr/bin/env bash - curl -L -s https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/master/faafo/contrib/install.sh | bash -s -- \ + curl -L -s https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/master/faafo/contrib/install-aws.sh | bash -s -- \ -i database -i messaging rabbitmqctl add_user faafo guest rabbitmqctl set_user_tags faafo administrator @@ -317,7 +317,7 @@ def main(): ########################################################################### userdata_api = '''#!/usr/bin/env bash - curl -L -s https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/master/faafo/contrib/install.sh | bash -s -- \ + curl -L -s https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/master/faafo/contrib/install-aws.sh | bash -s -- \ -i faafo -r api -m 'amqp://faafo:guest@%(services_ip)s:5672/' \ -d 'mysql+pymysql://faafo:password@%(services_ip)s:3306/faafo' ''' % {'services_ip': services_ip} @@ -355,12 +355,12 @@ def main(): ########################################################################### userdata_worker = '''#!/usr/bin/env bash - curl -L -s https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/master/faafo/contrib/install.sh | bash -s -- \ + curl -L -s https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/master/faafo/contrib/install-aws.sh | bash -s -- \ -i faafo -r worker -e 'http://%(api_1_ip)s' -m 'amqp://faafo:guest@%(services_ip)s:5672/' ''' % {'api_1_ip': api_1_ip, 'services_ip': services_ip} # userdata_api-api-2 = '''#!/usr/bin/env bash - # curl -L -s https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/master/faafo/contrib/install.sh | bash -s -- \ + # curl -L -s https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/master/faafo/contrib/install-aws.sh | bash -s -- \ # -i faafo -r worker -e 'http://%(api_2_ip)s' -m 'amqp://faafo:guest@%(services_ip)s:5672/' # ''' % {'api_2_ip': api_2_ip, 'services_ip': services_ip}