-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added ansible installer for multicloud (#1359)
* added ansible installer for multicloud * updated os in ci.yml to ubuntu 20.04 * deleted files that are not required for multicloud installation * Removed dashboard, updated install_dependencies.sh * updated the copyright header from OPENSDS to SODA * updated hardcoded host_ip in common.yml to env variable * Created README.md * upgraded docker-compose to docker compose * added go version check in install_dependencies.sh, minor changes in README * removed etcd related file
- Loading branch information
1 parent
4d91267
commit ca135a6
Showing
34 changed files
with
2,188 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Multi-cloud Installation Guide | ||
|
||
## Ansible Installer | ||
* Supported OS: **Ubuntu 18.04, 20.04** | ||
* Prerequisite: **Python 3.6+** and **Go 1.17+** should be installed | ||
|
||
**Note**: Ensure root user access while performing the installation. | ||
|
||
### Install Steps | ||
```bash | ||
apt-get update && apt-get install -y git curl wget libltdl7 libseccomp2 libffi-dev | ||
git clone https://github.com/sodafoundation/multi-cloud.git | ||
cd multi-cloud/installer | ||
chmod +x install_dependencies.sh && . install_dependencies.sh | ||
``` | ||
|
||
### Set Host IP | ||
```bash | ||
cd ansible | ||
export HOST_IP=<your_host_ip> | ||
``` | ||
|
||
### Run the Ansible Playbook to install Multi-cloud | ||
```bash | ||
ansible-playbook site.yml -i local.hosts | ||
``` | ||
|
||
### Uninstall and Purge | ||
```bash | ||
ansible-playbook clean.yml -i local.hosts | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright 2022 The SODA Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
--- | ||
# Defines some clean processes when banishing the cluster. | ||
|
||
- name: destroy an opensds cluster | ||
hosts: | ||
- controllers | ||
remote_user: root | ||
vars_files: | ||
- group_vars/common.yml | ||
- group_vars/auth.yml | ||
- group_vars/gelato.yml | ||
gather_facts: false | ||
become: True | ||
tasks: | ||
- import_role: | ||
name: cleaner | ||
|
||
# Uninstall the Multicloud services on Kubernetes Cluster. | ||
- name: uninstall multi-cloud HA services on Kubernetes Cluster. | ||
hosts: k8smaster | ||
remote_user: "{{ k8s_user }}" | ||
vars_files: | ||
- group_vars/common.yml | ||
- group_vars/gelato-ha.yml | ||
gather_facts: false | ||
become: True | ||
tasks: | ||
- import_role: | ||
name: gelato-ha-uninstaller | ||
when: gelato_ha == true | ||
tags: gelato_ha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright 2022 The SODA Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
--- | ||
# Dummy variable to avoid error because ansible does not recognize the | ||
# file as a good configuration file when no variable in it. | ||
dummy: | ||
|
||
|
||
########### | ||
# GENERAL # | ||
########### | ||
|
||
# OpenSDS authentication strategy, support 'noauth' and 'keystone'. | ||
opensds_auth_strategy: keystone | ||
|
||
# Install keystone with docker | ||
install_keystone_with_docker: true | ||
|
||
# The URL should be replaced with the keystone actual URL | ||
keystone_os_auth_url: "http://{{ host_ip }}/identity" | ||
|
||
# delete all keystone packages | ||
keystone_uninstall_purge: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copyright 2022 The SODA Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
--- | ||
# Dummy variable to avoid error because ansible does not recognize the | ||
# file as a good configuration file when no variable in it. | ||
dummy: | ||
|
||
|
||
########### | ||
# GENERAL # | ||
########### | ||
|
||
# This field indicates local machine host ip | ||
host_ip: $HOST_IP | ||
|
||
#Deploy multicloud in HA mode - default is false | ||
gelato_ha: false | ||
|
||
# This field indicates which way user prefers to install, currently support | ||
# 'repository', 'release' and 'container' | ||
install_from: release | ||
|
||
# These fields below will specify the tag based on install_from type | ||
repo_branch: master | ||
release_version: v1.7.0 | ||
|
||
# This field indicates which os family the system will be running, currently | ||
# support 'Debian' and 'RedHat' | ||
ansible_os_family: Debian | ||
|
||
# delete all source packages | ||
source_purge: true | ||
|
||
# delete database | ||
database_purge: true | ||
|
||
############### | ||
# Respective projects release versions | ||
gelato_release_version: v1.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Copyright 2022 The SODA Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
--- | ||
# Dummy variable to avoid error because ansible does not recognize the | ||
# file as a good configuration file when no variable in it. | ||
dummy: | ||
|
||
|
||
########### | ||
# GENERAL # | ||
########### | ||
|
||
# User permitted to access the Kubernetes Cluster to deploy the multicloud services. | ||
# 'ubuntu' is a sample user, it should be replaced with the actual user permitted | ||
# to access the Kubernetes Cluster, when deployed in production. | ||
k8s_user: ubuntu | ||
|
||
# These IPs are dummy IPs, which get updated appropriately during deployment. | ||
# These are populated by installer in a Multi-Cloud HA installation. | ||
|
||
gelato_ha_api_ip: 0.0.0.0 | ||
gelato_ha_api_port: 30099 | ||
|
||
gelato_ha_s3_ip: 0.0.0.0 | ||
gelato_ha_s3_port: 30090 | ||
|
||
# These fields are NOT suggested to be modifie | ||
gelato_work_dir: /opt/opensds-gelato-linux-amd64 | ||
|
||
# The installation type of gelato-ha is container, both REPOSITORY and RELEASE will | ||
# use gelato image to deploy. | ||
gelato_image_tag: "{{ gelato_release_version }}" | ||
|
||
############## | ||
# REPOSITORY # | ||
############## | ||
|
||
# If user specifies intalling from repository, then he can choose the specific | ||
# repository branch | ||
gelato_repo_branch: "{{ repo_branch }}" | ||
|
||
# These fields are NOT suggested to be modified | ||
gelato_remote_url: https://github.com/sodafoundation/multi-cloud.git | ||
|
||
########### | ||
# RELEASE # | ||
########### | ||
|
||
# If user specifies intalling from release,then he can choose the specific version | ||
gelato_release: "{{ gelato_release_version }}" | ||
|
||
# These fields are NOT suggested to be modified | ||
gelato_download_url: https://github.com/sodafoundation/multi-cloud/archive/{{ gelato_release }}.tar.gz | ||
gelato_tarball_dir: /tmp/gelato-{{ gelato_release }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright 2022 The SODA Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
--- | ||
# Dummy variable to avoid error because ansible does not recognize the | ||
# file as a good configuration file when no variable in it. | ||
dummy: | ||
|
||
|
||
########### | ||
# GENERAL # | ||
########### | ||
|
||
# These fields are NOT suggested to be modifie | ||
gelato_work_dir: /opt/opensds-gelato-linux-amd64 | ||
|
||
# The installation type of gelato is container, both REPOSITORY and RELEASE will | ||
# use gelato image to deploy. | ||
gelato_image_tag: "{{ gelato_release_version }}" | ||
|
||
############## | ||
# REPOSITORY # | ||
############## | ||
|
||
# If user specifies intalling from repository, then he can choose the specific | ||
# repository branch | ||
gelato_repo_branch: "{{ repo_branch }}" | ||
|
||
# These fields are NOT suggested to be modified | ||
gelato_remote_url: https://github.com/sodafoundation/multi-cloud.git | ||
|
||
########### | ||
# RELEASE # | ||
########### | ||
|
||
# If user specifies intalling from release,then he can choose the specific version | ||
gelato_release: "{{ gelato_release_version }}" | ||
|
||
# These fields are NOT suggested to be modified | ||
gelato_download_url: https://github.com/sodafoundation/multi-cloud/archive/{{ gelato_release }}.tar.gz | ||
gelato_tarball_dir: /tmp/gelato-{{ gelato_release }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2022 The SODA Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
[controllers] | ||
localhost ansible_connection=local | ||
|
||
# This group has the Kubernetes Master node details. The MultiCloud Pods are deployed on this Kubernetes cluster. | ||
[k8smaster] | ||
# master ansible_port=22 ansible_user=root ansible_host=192.168.20.xx |
Oops, something went wrong.