Skip to content
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

Merged
merged 10 commits into from
Nov 28, 2022
Merged

added ansible installer for multicloud #1359

merged 10 commits into from
Nov 28, 2022

Conversation

devanshjain7
Copy link
Contributor

@devanshjain7 devanshjain7 commented Nov 21, 2022

What type of PR is this?

/kind enhancement

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:
Screenshot from 2022-11-24 14-41-30

All multi-cloud services up and running:
Screenshot from 2022-11-24 14-42-40

Screenshot from 2022-11-24 14-43-21

@codecov
Copy link

codecov bot commented Nov 24, 2022

Codecov Report

Merging #1359 (941ffbb) into master (de94184) will not change coverage.
The diff coverage is n/a.

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove api, dock, controller

Copy link
Contributor Author

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this file required?

Copy link
Contributor Author

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
Copy link
Collaborator

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

Copy link
Contributor Author

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
Copy link
Collaborator

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

Copy link
Contributor Author

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
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,43 @@
#!/usr/bin/env bash
Copy link
Collaborator

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

Copy link
Contributor Author

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
Copy link
Collaborator

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

Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,46 @@
# Copyright 2019 The OpenSDS Authors.
Copy link
Collaborator

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.

Copy link
Contributor Author

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.
Copy link
Collaborator

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

Copy link
Contributor Author

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 -
Copy link
Collaborator

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

Copy link
Contributor Author

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
Copy link
Collaborator

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

Copy link
Contributor Author

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.

Copy link
Collaborator

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)

Copy link
Contributor Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed

Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed

Copy link
Contributor Author

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:
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes done

@@ -0,0 +1,36 @@
# Multicloud Installation Guide
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


## Ansible Installer
* Supported OS: **Ubuntu 18.04, 20.04**
* Prerequisite: **Python 3.6 or above** should be installed
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

apt-get install -y python3-pip

# Install ansible if not present
if [ "`which ansible`" != "" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for go1.17

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

@PravinRanjan10 PravinRanjan10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@joseph-v joseph-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PravinRanjan10 PravinRanjan10 merged commit ca135a6 into sodafoundation:master Nov 28, 2022
if (( ${v[0]} == 1 && ${v[1]} >= 17 )); then
echo Go 1.17+ already installed, skipping.
else
echo Removing existing Go installation
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make a independent installer for multi-cloud
5 participants