Browse Source

bumped default distro in demos, bound mariadb to all ips, added template explaination

pull/3/head
Sebastian Rieger 1 month ago
parent
commit
eeb9bbf43c
  1. 4
      demo1-getting-started.py
  2. 4
      demo2-instance-with-init-script.py
  3. 10
      demo3-microservice.py
  4. 4
      demo4-scale-out-add-worker.py
  5. 13
      demo4-scale-out.py
  6. 4
      faafo/contrib/install.sh
  7. 4
      faafo/faafo/api/templates/index.html

4
demo1-getting-started.py

@ -32,8 +32,8 @@ project_name = 'CloudComp' + str(group_number)
project_network = 'CloudComp' + str(group_number) + '-net'
# The image to look for and use for the started instance
#ubuntu_image_name = "Ubuntu 18.04 - Bionic Beaver - 64-bit - Cloud Based Image"
ubuntu_image_name = "Ubuntu 20.04 - Focal Fossa - 64-bit - Cloud Based Image"
#ubuntu_image_name = "Ubuntu 20.04 - Focal Fossa - 64-bit - Cloud Based Image"
ubuntu_image_name = "Ubuntu 22.04 - Jammy Jellyfish - 64-bit - Cloud Based Image"
# default region
region_name = 'RegionOne'

4
demo2-instance-with-init-script.py

@ -20,8 +20,8 @@ project_name = 'CloudComp' + str(group_number)
project_network = 'CloudComp' + str(group_number) + '-net'
# The image to look for and use for the started instance
#ubuntu_image_name = "Ubuntu 18.04 - Bionic Beaver - 64-bit - Cloud Based Image"
ubuntu_image_name = "Ubuntu 20.04 - Focal Fossa - 64-bit - Cloud Based Image"
#ubuntu_image_name = "Ubuntu 20.04 - Focal Fossa - 64-bit - Cloud Based Image"
ubuntu_image_name = "Ubuntu 22.04 - Jammy Jellyfish - 64-bit - Cloud Based Image"
# The public key to be used for SSH connection, please make sure, that you have the corresponding private key
#

10
demo3-microservice.py

@ -24,8 +24,8 @@ project_name = 'CloudComp' + str(group_number)
project_network = 'CloudComp' + str(group_number) + '-net'
# The image to look for and use for the started instance
#ubuntu_image_name = "Ubuntu 18.04 - Bionic Beaver - 64-bit - Cloud Based Image"
ubuntu_image_name = "Ubuntu 20.04 - Focal Fossa - 64-bit - Cloud Based Image"
#ubuntu_image_name = "Ubuntu 20.04 - Focal Fossa - 64-bit - Cloud Based Image"
ubuntu_image_name = "Ubuntu 22.04 - Jammy Jellyfish - 64-bit - Cloud Based Image"
# The public key to be used for SSH connection, please make sure, that you have the corresponding private key
#
@ -166,12 +166,6 @@ def main():
#
###########################################################################
# https://git.openstack.org/cgit/openstack/faafo/plain/contrib/install.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 ;)
#hsfd_faafo_cloud_init_script = 'https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/master/faafo/contrib/install.sh'
# testing / faafo dev branch:
hsfd_faafo_cloud_init_script = 'https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/branch/dev_faafo/faafo/contrib/install.sh'

4
demo4-scale-out-add-worker.py

@ -26,8 +26,8 @@ project_name = 'CloudComp' + str(group_number)
project_network = 'CloudComp' + str(group_number) + '-net'
# The image to look for and use for the started instance
#ubuntu_image_name = "Ubuntu 18.04 - Bionic Beaver - 64-bit - Cloud Based Image"
ubuntu_image_name = "Ubuntu 20.04 - Focal Fossa - 64-bit - Cloud Based Image"
#ubuntu_image_name = "Ubuntu 20.04 - Focal Fossa - 64-bit - Cloud Based Image"
ubuntu_image_name = "Ubuntu 22.04 - Jammy Jellyfish - 64-bit - Cloud Based Image"
# The public key to be used for SSH connection, please make sure, that you have the corresponding private key
#

13
demo4-scale-out.py

@ -13,7 +13,7 @@ from libcloud.compute.types import Provider
# Please use 1-29 for X in the following variable to specify your group number. (will be used for the username,
# project etc., as coordinated in the lab sessions)
group_number = X
group_number = 2
# web service endpoint of the private cloud infrastructure
@ -26,8 +26,9 @@ project_name = 'CloudComp' + str(group_number)
project_network = 'CloudComp' + str(group_number) + '-net'
# The image to look for and use for the started instance
#ubuntu_image_name = "Ubuntu 18.04 - Bionic Beaver - 64-bit - Cloud Based Image"
ubuntu_image_name = "Ubuntu 20.04 - Focal Fossa - 64-bit - Cloud Based Image"
#ubuntu_image_name = "Ubuntu 20.04 - Focal Fossa - 64-bit - Cloud Based Image"
ubuntu_image_name = "Ubuntu 22.04 - Jammy Jellyfish - 64-bit - Cloud Based Image"
# The public key to be used for SSH connection, please make sure, that you have the corresponding private key
#
@ -227,12 +228,6 @@ def main():
#
###########################################################################
# https://git.openstack.org/cgit/openstack/faafo/plain/contrib/install.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 ;)
#hsfd_faafo_cloud_init_script = 'https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/master/faafo/contrib/install.sh'
# testing / faafo dev branch:
hsfd_faafo_cloud_init_script = 'https://gogs.informatik.hs-fulda.de/srieger/cloud-computing-msc-ai-examples/raw/branch/dev_faafo/faafo/contrib/install.sh'

4
faafo/contrib/install.sh

@ -88,18 +88,20 @@ if [[ -e /etc/os-release ]]; then
# HSFD changes for Ubuntu 18.04
#sudo sed -i -e "/bind-address/d" /etc/mysql/mysql.conf.d/mysqld.cnf
##sudo sed -i -e "/bind-address/d" /etc/mysql/my.cnf
sudo sed -i -e "s/127.0.0.1/0.0.0.0/g" /etc/mysql/mariadb.conf.d/50-server.cnf
sudo mysqmladmin password password
sudo systemctl restart mariadb
elif [[ $ID = 'fedora' ]]; then
# fedora currently not tested nor supported
sudo dnf install -y mariadb-server python3-mysql
printf "[mysqld]\nbind-address = 127.0.0.1\n" | sudo tee /etc/my.cnf.d/faafo.conf
sudo mysqmladmin password password
sudo systemctl enable mariadb
sudo systemctl start mariadb
else
echo "error: distribution $ID not supported"
exit 1
fi
sudo mariadb-admin password password
sudo mysql -uroot -ppassword mysql -e "CREATE DATABASE IF NOT EXISTS faafo; GRANT ALL PRIVILEGES ON faafo.* TO 'faafo'@'%' IDENTIFIED BY 'password';"
URL_DATABASE='mysql://root:password@localhost/faafo'
fi

4
faafo/faafo/api/templates/index.html

@ -57,9 +57,9 @@ yb = {{ fractal.yb }}</pre>
</div>
{% endfor %}
{{render_pagination(fractals)}}
<!--
<!-- requires POST request to have Content-Type: "application/vnd.api+json" header, would require Fetch API or XMLHTTPRequest etc.
<div>
<form action="/v1/fractal" method="POST" enctype="application/vnd.api+json">
<form action="/v1/fractal" method="POST">
<input type="submit" value="Create new fractals">
</form>
</div>

Loading…
Cancel
Save