From 7abf0a8bcb4a9a786e1b75a1707c80357b93a531 Mon Sep 17 00:00:00 2001
From: Carles Garcia Cabot <carles.garcia.cabot@cern.ch>
Date: Wed, 14 Oct 2020 10:50:01 +0200
Subject: [PATCH 1/4] Add script to creat flask VM

---
 create-flask-machine.sh | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 create-flask-machine.sh

diff --git a/create-flask-machine.sh b/create-flask-machine.sh
new file mode 100644
index 00000000..2c01d19c
--- /dev/null
+++ b/create-flask-machine.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+export OS_IDENTITY_API_VERSION=3
+export OS_PROJECT_DOMAIN_ID=default
+export OS_PROJECT_NAME="IT FTS development"
+export OS_AUTH_URL=https://keystone.cern.ch/v3
+export OS_USERNAME=$USER
+
+openstack server list  > /dev/null 2>&1
+if [ $? != "0" ] ; then
+  echo "openstack server not working"
+  exit
+fi
+
+export ENVIRO="ftsclean"
+
+KEYPAIR="fts3ops"
+
+if [ "$#" -ne 1 ]
+then
+  echo "host name required"
+  exit 1
+fi
+
+hostname=$1
+
+ai-bs \
+     --foreman-hostgroup 'fts/devel/flask' \
+     --foreman-environment "${ENVIRO}" \
+     --landb-mainuser 'FTS-3RD' \
+     --landb-responsible 'FTS-3RD' \
+     --nova-flavor "m2.large" \
+     --nova-sshkey "${KEYPAIR}" \
+     --landb-ipv6ready \
+     --cc7 \
+ $hostname
+ 
+
-- 
GitLab


From 2317c1602421c8ef3683a4d31a36728dfed0c478 Mon Sep 17 00:00:00 2001
From: Carles Garcia Cabot <carles.garcia.cabot@cern.ch>
Date: Wed, 14 Oct 2020 11:34:33 +0200
Subject: [PATCH 2/4] improve create script

---
 create-flask-machine.sh | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/create-flask-machine.sh b/create-flask-machine.sh
index 2c01d19c..41c94166 100644
--- a/create-flask-machine.sh
+++ b/create-flask-machine.sh
@@ -1,10 +1,6 @@
 #!/bin/bash
 
-export OS_IDENTITY_API_VERSION=3
-export OS_PROJECT_DOMAIN_ID=default
-export OS_PROJECT_NAME="IT FTS development"
-export OS_AUTH_URL=https://keystone.cern.ch/v3
-export OS_USERNAME=$USER
+eval $(ai-rc --same-project-as fts-devel-01)
 
 openstack server list  > /dev/null 2>&1
 if [ $? != "0" ] ; then
@@ -34,5 +30,5 @@ ai-bs \
      --landb-ipv6ready \
      --cc7 \
  $hostname
- 
+
 
-- 
GitLab


From 684c3ecb74689ab4778a6c0c5aa99f333540454f Mon Sep 17 00:00:00 2001
From: Carles Garcia Cabot <carles.garcia.cabot@cern.ch>
Date: Thu, 15 Oct 2020 10:19:31 +0200
Subject: [PATCH 3/4] neww subhg under live

---
 create-flask-machine.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/create-flask-machine.sh b/create-flask-machine.sh
index 41c94166..3ed3e351 100644
--- a/create-flask-machine.sh
+++ b/create-flask-machine.sh
@@ -8,9 +8,9 @@ if [ $? != "0" ] ; then
   exit
 fi
 
-export ENVIRO="ftsclean"
-
+ENVIRO="qa"
 KEYPAIR="fts3ops"
+HOSTGROUP="fts/devel/mysql/live/flask"
 
 if [ "$#" -ne 1 ]
 then
@@ -21,7 +21,7 @@ fi
 hostname=$1
 
 ai-bs \
-     --foreman-hostgroup 'fts/devel/flask' \
+     --foreman-hostgroup "${HOSTGROUP}" \
      --foreman-environment "${ENVIRO}" \
      --landb-mainuser 'FTS-3RD' \
      --landb-responsible 'FTS-3RD' \
-- 
GitLab


From 2a76d0c3596806c54bed0065a8f0df2b8289801a Mon Sep 17 00:00:00 2001
From: Carles Garcia Cabot <carles.garcia.cabot@cern.ch>
Date: Thu, 15 Oct 2020 11:21:00 +0200
Subject: [PATCH 4/4] insert default fts3 db user

---
 src/fts3rest/ftsrestconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fts3rest/ftsrestconfig b/src/fts3rest/ftsrestconfig
index 733d90d4..eff361a9 100644
--- a/src/fts3rest/ftsrestconfig
+++ b/src/fts3rest/ftsrestconfig
@@ -2,7 +2,7 @@
 DbType=mysql
 
 #db username
-DbUserName=
+DbUserName=fts3
 
 #db password
 DbPassword=
-- 
GitLab