Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloud-computing-msc-ai-examples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Rieger
cloud-computing-msc-ai-examples
Commits
172ccb27
Commit
172ccb27
authored
11 months ago
by
Sebastian Rieger
Browse files
Options
Downloads
Patches
Plain Diff
updated aws ami and aws clout-init script
parent
12db4e64
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
example-projects/demo3-microservice-in-aws.py
+2
-1
2 additions, 1 deletion
example-projects/demo3-microservice-in-aws.py
faafo/contrib/install-aws.sh
+11
-10
11 additions, 10 deletions
faafo/contrib/install-aws.sh
with
13 additions
and
11 deletions
example-projects/demo3-microservice-in-aws.py
+
2
−
1
View file @
172ccb27
...
...
@@ -14,7 +14,8 @@ home = expanduser("~")
# IP, but elastic ips are expensive - make sure to delete them after you used them
# 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
'
# 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
...
...
This diff is collapsed.
Click to expand it.
faafo/contrib/install-aws.sh
+
11
−
10
View file @
172ccb27
...
...
@@ -84,22 +84,24 @@ if [[ -e /etc/os-release ]]; then
if
[[
$INSTALL_DATABASE
-eq
1
]]
;
then
if
[[
$ID
=
'ubuntu'
||
$ID
=
'debian'
]]
;
then
sudo
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
m
ysql
-server python-mysqldb
sudo
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
m
ariadb
-server python
3
-mysqldb
# 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
service mysql restart
#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
mysqladmin password password
sudo
systemctl restart mariadb
elif
[[
$ID
=
'fedora'
]]
;
then
# fedora currently not tested nor supported
sudo
dnf
install
-y
mariadb-server python-mysql
sudo
dnf
install
-y
mariadb-server python
3
-mysql
printf
"[mysqld]
\n
bind-address = 127.0.0.1
\n
"
|
sudo tee
/etc/my.cnf.d/faafo.conf
sudo
mysqladmin password password
sudo
systemctl
enable
mariadb
sudo
systemctl start mariadb
else
echo
"error: distribution
$ID
not supported"
exit
1
fi
sudo
mysqladmin 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
...
...
@@ -124,8 +126,7 @@ if [[ -e /etc/os-release ]]; then
if
[[
$INSTALL_FAAFO
-eq
1
]]
;
then
if
[[
$ID
=
'ubuntu'
||
$ID
=
'debian'
]]
;
then
# TODO: needs to be updated for Ubuntu >= 20.04
sudo
apt-get
install
-y
python-dev python-pip supervisor git zlib1g-dev libmysqlclient-dev python-mysqldb
sudo
apt-get
install
-y
python3-dev python3-pip supervisor git zlib1g-dev libmysqlclient-dev python3-mysqldb python-is-python3
# Following is needed because of
# https://bugs.launchpad.net/ubuntu/+source/supervisor/+bug/1594740
if
[
$(
lsb_release
--short
--codename
)
=
xenial
]
;
then
...
...
@@ -140,7 +141,7 @@ if [[ -e /etc/os-release ]]; then
fi
elif
[[
$ID
=
'fedora'
]]
;
then
# fedora currently not tested nor supported
sudo
dnf
install
-y
python-devel python-pip supervisor git zlib-devel mariadb-devel gcc which python-mysql
sudo
dnf
install
-y
python
3
-devel python
3
-pip supervisor git zlib-devel mariadb-devel gcc which python
3
-mysql
sudo
systemctl
enable
supervisord
sudo
systemctl start supervisord
#elif [[ $ID = 'opensuse' || $ID = 'sles' ]]; then
...
...
@@ -162,7 +163,7 @@ if [[ -e /etc/os-release ]]; then
sudo
mkswap /swap
sudo
swapon /swap
sudo
pip
install
-r
requirements.txt
sudo
python setup.py
install
sudo
python
3
setup.py
install
sudo sed
-i
-e
"s#transport_url = .*#transport_url =
$URL_MESSAGING
#"
/etc/faafo/faafo.conf
sudo sed
-i
-e
"s#database_url = .*#database_url =
$URL_DATABASE
#"
/etc/faafo/faafo.conf
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment