-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added ansible installer for multicloud #1359
added ansible installer for multicloud #1359
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove api, dock, controller
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1,13 @@ | |||
# Copyright 2018 The OpenSDS Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this file required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for pointing out. its not required. deleted.
@@ -0,0 +1,18 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file may not required. Please check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted this file
@@ -0,0 +1,18 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file may not required. Please check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted this file
# delete database | ||
database_purge: true | ||
|
||
# OpenSDS configuration file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line may not required. plz check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file may not require. Please check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Multi-Cloud service name in keystone | ||
MULTICLOUD_SERVER_NAME=${MULTICLOUD_SERVER_NAME:-opensds} | ||
|
||
# devstack keystone configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 36-45 not required. Please check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also line # 24-25, 30-31.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update with "Copyright 2022 The SODA Authors." in all files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1,55 @@ | |||
# Copyright 2019 The OpenSDS Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file may not be needed, when dashboard installation is removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check docker & ansible install step from Delfin. "add-apt-repository" is getting depricated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes thanks. done
fi | ||
|
||
# Install docker compose | ||
echo Installing docker-compose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay. Please go ahead with docker compose (the new install steps)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
# limitations under the License. | ||
|
||
--- | ||
- name: uninstall opensds keystone with the script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
# limitations under the License. | ||
|
||
- name: stop container where dashboard is located | ||
docker_container: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all dashboard, keystone cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes done
installer/README.md
Outdated
@@ -0,0 +1,36 @@ | |||
# Multicloud Installation Guide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update multi-cloud at every place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update go version, 1.17.9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
installer/install_dependencies.sh
Outdated
apt-get install -y python3-pip | ||
|
||
# Install ansible if not present | ||
if [ "`which ansible`" != "" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check for go1.17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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: