seqpod / seqpod-api

Application Server of Seqpod Project
MIT License
0 stars 0 forks source link

[v0] Deploy process :( #1

Open otiai10 opened 7 years ago

otiai10 commented 7 years ago
  1. docker-machine create x2
    • check ssh connection to both
otiai10 commented 7 years ago

step1. VPC

image

image

otiai10 commented 7 years ago

step2. InternetGateway

create and attach to that VPC

otiai10 commented 7 years ago

step3. Route Table of VPC

image

↑this is not correct!!!

Destination should be 0.0.0.0/0 to make it open to the Internet

otiai10 commented 7 years ago

step4. Subnet

image

it must be inside a AZ

otiai10 commented 7 years ago

step5. Create Machine: app

% docker-machine create --driver amazonec2 \
--amazonec2-region ap-southeast-2 \
--amazonec2-vpc-id vpc-f4bec590 \
--amazonec2-subnet-id subnet-f31e1c97 \
--amazonec2-security-group seqpod-app \
--amazonec2-instance-type t2.micro \
--engine-install-url=https://releases.rancher.com/install-docker/1.13.sh \
aws-seqpod-app
Running pre-create checks...
Creating machine...
(aws-seqpod-app) Launching instance...
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!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env aws-seqpod-app
%
otiai10 commented 7 years ago

step6. Create Machine: worker

% docker-machine create --driver amazonec2 \
--amazonec2-region ap-southeast-2 \
--amazonec2-vpc-id vpc-f4bec590 \
--amazonec2-subnet-id subnet-f31e1c97 \
--amazonec2-security-group seqpod-worker \
--amazonec2-instance-type m4.xlarge \
--engine-install-url=https://releases.rancher.com/install-docker/1.13.sh \
aws-seqpod-worker
Running pre-create checks...
Creating machine...
(aws-seqpod-worker) Launching instance...
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!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env aws-seqpod-worker
%
otiai10 commented 7 years ago

step7. Fix Security Group

seqpod-app

image

seqpod-worker

image

is the IP Address of our laboratory

otiai10 commented 7 years ago

step8. Setup EFS

  1. create Security Group for FS
  2. create FS instance
  3. sudo apt-get install -y nfs-common && mount
    • from both App and Worker

image

Therefore,

image

image

ubuntu@aws-seqpod-app:~$ sudo chmod o+rw /var/app
otiai10 commented 7 years ago

step9. place certs of worker, on app machine

ubuntu@aws-seqpod-app:~$ sudo mkdir /var/machine
ubuntu@aws-seqpod-app:~$ sudo chmod a+rw /var/machine
% docker-machine scp -r ~/.docker/machine/machines/aws-seqpod-worker aws-seqpod-app:/var/machine
otiai10 commented 7 years ago

should be something else... 👎

otiai10 commented 7 years ago

Shutting down and cleaning up

  1. [console] Terminate 2 instances
  2. [console] Terminate EFS
  3. [local] docker-machine rm 2 machines
  4. [console] Delete VPC