Skip to content

Latest commit

 

History

History
90 lines (79 loc) · 2.14 KB

README.md

File metadata and controls

90 lines (79 loc) · 2.14 KB

ocean

Ocean is the place where whales live, eat, sleep, and think.

Prerequisites

  • Access the bastion
  • Add the bastion's public key to each node

Initial setup

Install virtualenv:

sudo apt-get update -y
sudo apt-get install -y pipx
pipx install virtualenv
pipx ensurepath

Create a virtual environment:

mkdir ./Ocean
cd ./Ocean/
virtualenv ansible
source ansible/bin/activate

Clone this repository:

git clone --recurse-submodules https://github.com/metalwhale/ocean
cd ./ocean/

Install requirements for kubespray:

cd ./kubernetes/kubespray/
pip install -U -r requirements.txt
cd ../../

Install roles:

ansible-galaxy install -r requirements.yml

Running playbooks

Forming Ocean

Create an inventory file and replace the placeholders with correct values:

cd ./ocean/
cp ./inventory.yaml.example ./inventory.yaml
vi ./inventory.yaml
  • IP_ADDRESSs: IP addresses of each node

Run basic setup:

ansible-playbook -i inventory.yaml --ask-become-pass base.yml
cd ../

Deploy kubernetes cluster

Create an inventory file and replace the placeholders with correct values:

cd ./kubernetes/
cp ./inventory/hosts.yaml.example ./inventory/hosts.yaml
vi ./inventory/hosts.yaml
  • IP_ADDRESSs: IP addresses of each node

Deploy Wave cluster:

cd ./kubespray/
ansible-playbook -i ../inventory --become --become-user=root --ask-become-pass cluster.yml
ansible-playbook -i ../inventory --become --become-user=root --ask-become-pass ../wave/cluster.yml
cd ../../

Setup a reverse proxy (optional)

If the cluster is deployed inside an internal network, you may need an Nginx server acting as a reverse proxy between the cluster and outside world, with the following SSL passthrough configuration:

stream {
    server {
        listen 80;
        proxy_pass LB_IP_ADDRESS:80;
    }
    server {
        listen 443;
        proxy_pass LB_IP_ADDRESS:443;
    }
}

Where LB_IP_ADDRESS is the IP address of the load balancer to forward requests to.