Skip to content

Commit

Permalink
tsuru-mvp (#5): tsuru install-create -c config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Jun 19, 2019
1 parent edc223b commit d580fe2
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 5 deletions.
20 changes: 20 additions & 0 deletions diario-de-bordo/tsuru-inicializacao/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,26 @@
# [Custo: < 100 BRL/mês]), talvez este arranjo inicial não seja o mais
# eficiente.
#
# ---------------------------------------------------------------------------- #
# Tsuru Cluster
# - 3 VPSs [CPU: 14][RAM: 32GB][Disco: 800GB SSD][Custo Mesal: < 100 BRL]
# - Nó com Tsuru: Delta (não exclusivo)
# - Um dos motivos de escolher Delta (que tem dobro de potencia das demais)
# é também que se eventualmente o cluster tiver que ser reduzido (ex.
# ainda não ser tão usado para justificar tanta potencia) a gente poderia
# permanecer apenas com a Delta e só recriar outras no futuro)
#
# VPSs
# - Águia Pescadora Delta: aguia-pescadora-delta.etica.ai
# - VPS (KVM), 6 vCPUs, 16GB RAM, 400GB SSD, Ubuntu Server 18.04 64bit, Contabo (Germany)
# - Diário de Bordo: https://github.com/EticaAI/aguia-pescadora/blob/master/diario-de-bordo/delta.sh
# - Águia Pescadora Echo: aguia-pescadora-echo.etica.ai
# - VPS (KVM), 4 vCPUs, 8GB RAM, 200GB SSD, Ubuntu Server 18.04 64bit, Contabo (Germany)
# - Diário de Bordo: https://github.com/EticaAI/aguia-pescadora/blob/master/diario-de-bordo/echo.sh
# - Águia Pescadora Foxtrot: aguia-pescadora-foxtrot.etica.ai
# - VPS (KVM), 4 vCPUs, 8GB RAM, 200GB SSD, Ubuntu Server 18.04 64bit, Contabo (Germany)
# - Diário de Bordo: https://github.com/EticaAI/aguia-pescadora/blob/master/diario-de-bordo/foxtrot.sh
#
# -----------------------------------------------------------------------------#
# LICENSE: Public Domain
# Except where otherwise noted, content on this server configuration and to
Expand Down
36 changes: 31 additions & 5 deletions diario-de-bordo/tsuru-inicializacao/seu-computador.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,27 @@ exit
# tudo
# config-charlie(uma-maquina-remota-com-tudo).yml
#
# -----------------------------------------------------------------------------#
# ---------------------------------------------------------------------------- #
# Tsuru Cluster
# - 3 VPSs [CPU: 14][RAM: 32GB][Disco: 800GB SSD][Custo Mesal: < 100 BRL]
# - Nó com Tsuru: Delta (não exclusivo)
# - Um dos motivos de escolher Delta (que tem dobro de potencia das demais)
# é também que se eventualmente o cluster tiver que ser reduzido (ex.
# ainda não ser tão usado para justificar tanta potencia) a gente poderia
# permanecer apenas com a Delta e só recriar outras no futuro)
#
# VPSs
# - Águia Pescadora Delta: aguia-pescadora-delta.etica.ai
# - VPS (KVM), 6 vCPUs, 16GB RAM, 400GB SSD, Ubuntu Server 18.04 64bit, Contabo (Germany)
# - Diário de Bordo: https://github.com/EticaAI/aguia-pescadora/blob/master/diario-de-bordo/delta.sh
# - Águia Pescadora Echo: aguia-pescadora-echo.etica.ai
# - VPS (KVM), 4 vCPUs, 8GB RAM, 200GB SSD, Ubuntu Server 18.04 64bit, Contabo (Germany)
# - Diário de Bordo: https://github.com/EticaAI/aguia-pescadora/blob/master/diario-de-bordo/echo.sh
# - Águia Pescadora Foxtrot: aguia-pescadora-foxtrot.etica.ai
# - VPS (KVM), 4 vCPUs, 8GB RAM, 200GB SSD, Ubuntu Server 18.04 64bit, Contabo (Germany)
# - Diário de Bordo: https://github.com/EticaAI/aguia-pescadora/blob/master/diario-de-bordo/foxtrot.sh
#
# ---------------------------------------------------------------------------- #
# LICENSE: Public Domain
# Except where otherwise noted, content on this server configuration and to
# the extent possible under law, Emerson Rocha has waived all copyright and
Expand Down Expand Up @@ -317,13 +337,19 @@ tsuru install-config-init
# - https://docs.tsuru.io/stable/installing/using-tsuru-installer.html#installing-on-already-provisioned-or-physical-hosts
# - https://docs.docker.com/machine/drivers/generic/

#### TSURU 1.7a: Customiza Tsuru para instalar em 3 nós
#### TSURU 1.7a: Customiza Tsuru para instalar em 3 nós ________________________
### @see https://docs.tsuru.io/stable/installing/using-tsuru-installer.html
### @see https://docs.tsuru.io/stable/installing/using-tsuru-installer.html#installing-on-already-provisioned-or-physical-hosts

# Por favor, veja o arquivo config.yml. Ele contém informações adicionais que
# não estão neste arquivo.
vim config.yml

# (...)
# Dica 1: se você estiver procurando instalar apenas em uma máquina remota veja
# config-charlie(uma-maquina-remota-com-tudo).yml

#### TSURU 1.8a: Ordena instação do Tsuru remotamente __________________________
# Dica 2: se nem mesmo tem uma máquina remota, veja
# seu-computador-virtualbox-local.sh

# (...)
#### TSURU 1.8a: Ordena instação do Tsuru remotamente __________________________
tsuru install-create -c config.yml
102 changes: 102 additions & 0 deletions diario-de-bordo/tsuru-inicializacao/tsuru-inicializacao.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# fititnt at bravo in /alligo/code/eticaai/aguia-pescadora/diario-de-bordo/tsuru-inicializacao on git:master x [20:00:05]
$ tsuru install-create -c config.yml
Running pre-install checks...
Creating CA: /home/fititnt/.tsuru/installs/aguia-pescadora/certs/ca.pem
Creating client certificate: /home/fititnt/.tsuru/installs/aguia-pescadora/certs/cert.pem
Running pre-create checks...
Creating machine...
(aguia-pescadora-1) Importing SSH key...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
Waiting for SSH to be available...
Detecting the provisioner...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Creating registry certificate...
Uploading registry certificate...
Deploying tsuru config...
Deploying compose file in cluster manager....
Creating network tsuru_tsuru
Creating service tsuru_planb
Creating service tsuru_registry
Creating service tsuru_tsuru
Creating service tsuru_redis
Creating service tsuru_mongo
Restarting docker in aguia-pescadora-1
Waiting for SSH to be available...
Detecting the provisioner...
Waiting for Tsuru API to become responsive...
+Opening config file: /etc/tsuru/tsuru.conf
�Done reading config file: /etc/tsuru/tsuru.conf
Warning: configuration didn't declare a database driver, using default driver.
Using "mongodb" database "tsuru" from the server "mongo:27017".

Password: 

Confirm: 
 Root user successfully created.
Bootstrapping Tsuru API...Running pre-create checks...
Creating machine...
(aguia-pescadora-2) Importing SSH key...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
Waiting for SSH to be available...
Detecting the provisioner...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Uploading registry certificate...
Running pre-create checks...
Creating machine...
(aguia-pescadora-3) Importing SSH key...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
Waiting for SSH to be available...
Detecting the provisioner...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Uploading registry certificate...
adding target
New target aguia-pescadora -> http://173.249.10.99:8080 added to target list and defined as the current target
log in with default user: admin@example.com Password:
Successfully logged in!
adding pool
Pool successfully registered.
adding node https://173.249.10.99:2376
Node successfully registered.
adding node https://167.86.127.220:2376
Node successfully registered.
adding node https://173.249.10.99:2376
Error: Error bootstrapping tsuru: failed to register node: Node address shouldn't repeat

0 comments on commit d580fe2

Please sign in to comment.