Skip to content

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

License

Notifications You must be signed in to change notification settings

metalwhale/ocean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published