added ansible installer for multicloud#1359
added ansible installer for multicloud#1359PravinRanjan10 merged 10 commits intosodafoundation:masterfrom devanshjain7:ansible-installer
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1359 +/- ##
=======================================
Coverage 48.12% 48.12%
=======================================
Files 10 10
Lines 1571 1571
=======================================
Hits 756 756
Misses 756 756
Partials 59 59 |
| ansible_os_family: Debian | ||
|
|
||
| # Install as systemd process or standalone application: true / false | ||
| # true: Will install api, dock, controller and etcd processes as a systemd services and enable them. Recommended for production use |
There was a problem hiding this comment.
remove api, dock, controller
| @@ -0,0 +1,13 @@ | |||
| # Copyright 2018 The OpenSDS Authors. | |||
There was a problem hiding this comment.
why this file required?
There was a problem hiding this comment.
thanks for pointing out. its not required. deleted.
| @@ -0,0 +1,18 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
this file may not required. Please check
There was a problem hiding this comment.
deleted this file
| @@ -0,0 +1,18 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
this file may not required. Please check
There was a problem hiding this comment.
deleted this file
| # delete database | ||
| database_purge: true | ||
|
|
||
| # OpenSDS configuration file |
There was a problem hiding this comment.
this line may not required. plz check
There was a problem hiding this comment.
It is being used to remove etcd data directory while cleaning.
https://github.com/sodafoundation/multi-cloud/blob/b6459548812ed643e9a0e8f1186f5d341e86cab2/installer/ansible/roles/cleaner/handlers/main.yml#L39-L47
| @@ -0,0 +1,43 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
this file may not require. Please check
There was a problem hiding this comment.
| # Multi-Cloud service name in keystone | ||
| MULTICLOUD_SERVER_NAME=${MULTICLOUD_SERVER_NAME:-opensds} | ||
|
|
||
| # devstack keystone configuration |
There was a problem hiding this comment.
line 36-45 not required. Please check
There was a problem hiding this comment.
also line # 24-25, 30-31.
There was a problem hiding this comment.
removed unused variables. most of them are being used in keystone.sh
installer/ansible/clean.yml
Outdated
| @@ -0,0 +1,46 @@ | |||
| # Copyright 2019 The OpenSDS Authors. | |||
There was a problem hiding this comment.
please update with "Copyright 2022 The SODA Authors." in all files.
| @@ -0,0 +1,55 @@ | |||
| # Copyright 2019 The OpenSDS Authors. | |||
There was a problem hiding this comment.
This file may not be needed, when dashboard installation is removed
| sudo add-apt-repository universe | ||
|
|
||
| echo Enabling docker repository | ||
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |
There was a problem hiding this comment.
Check docker & ansible install step from Delfin. "add-apt-repository" is getting depricated
There was a problem hiding this comment.
yes thanks. done
| fi | ||
|
|
||
| # Install docker compose | ||
| echo Installing docker-compose |
There was a problem hiding this comment.
No need to install docker-compose, we can use docker compose from the new install steps for docker
There was a problem hiding this comment.
currently supporting docker-compose instead of docker compose. @PravinRanjan10 pls let me know if any changes required here.
There was a problem hiding this comment.
okay. Please go ahead with docker compose (the new install steps)
| # limitations under the License. | ||
|
|
||
| --- | ||
| - name: uninstall opensds keystone with the script |
There was a problem hiding this comment.
keystone required for mullti-cloud. even for API(postman)
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| - name: stop container where dashboard is located |
| # limitations under the License. | ||
|
|
||
| - name: stop container where dashboard is located | ||
| docker_container: |
There was a problem hiding this comment.
Remove all dashboard, keystone cleanup
installer/README.md
Outdated
| @@ -0,0 +1,36 @@ | |||
| # Multicloud Installation Guide | |||
There was a problem hiding this comment.
update multi-cloud at every place
installer/README.md
Outdated
|
|
||
| ## Ansible Installer | ||
| * Supported OS: **Ubuntu 18.04, 20.04** | ||
| * Prerequisite: **Python 3.6 or above** should be installed |
There was a problem hiding this comment.
update go version, 1.17.9
installer/install_dependencies.sh
Outdated
| apt-get install -y python3-pip | ||
|
|
||
| # Install ansible if not present | ||
| if [ "`which ansible`" != "" ]; then |
| if (( ${v[0]} == 1 && ${v[1]} >= 17 )); then | ||
| echo Go 1.17+ already installed, skipping. | ||
| else | ||
| echo Removing existing Go installation |
There was a problem hiding this comment.
@devanshjain7 @PravinRanjan10 User may have existing Go installation for some other work.
Before deleting the existing Go installation confirm with the user if it is ok.
Or we need to install the required Go version separately and use it.
What type of PR is this?
What this PR does / why we need it:
Added ansible installer for multicloud
Which issue(s) this PR fixes:
Fixes #1357
Testing
Independent multicloud installation using ansible has been tested on the following configuration:
Ubuntu version 20.04
Go version 1.17.9
Ansible version 2.9.6
Docker version 20.10.21
Docker Compose version 1.23.1
Ansible Installation succesfully completed:

All multi-cloud services up and running:
