Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Docker deployment in production #643

Open
michbil opened this issue May 4, 2016 · 7 comments
Open

Move to Docker deployment in production #643

michbil opened this issue May 4, 2016 · 7 comments

Comments

@michbil
Copy link
Contributor

michbil commented May 4, 2016

The task is to create automated deployment using docker on the server.
Docker image builds are made by the docker hub, sample docker hub is https://hub.docker.com/u/michbil/

Deployment workflow:

  1. Commit is pushed to the production branch of the repository.
  2. Docker hub triggers image build accoring to the dockerfile
  3. Once build is finished docker hub triggers webhook on our server, and triggers image pull and respective service restart.

Link on webhook workflow: Using webhooks and workflow

Server runs docker-compose https://github.com/michbil/Wrio-Docker-Production
Webhooks are triggered on server by https://github.com/cpuguy83/dockerhub-webhook-listener

Webhook for titter shoud do approx this to pull latest image from the hub and restart service

docker pull michbil/titter-wrio-app
docker-compose up --no-deps -d titter
@AlexeyAnshakov
Copy link
Member

@michbil please add info to wiki

@michbil
Copy link
Contributor Author

michbil commented May 4, 2016

@AlexeyAnshakov done

@michbil
Copy link
Contributor Author

michbil commented Jul 12, 2016

@umairadeeb Current state of docker migration: automatic deployment working ok.
What need to be done:

  1. Make docker demon start upon server reboot
  2. Make docker-compose up -d run upon server reboot
  3. Make webhook listener run upon server reboot /etc/init.d/webhooks
  4. Stop opsworks deamon, cause it not needed right now.
  5. Cleanup monit scripts, because services now monitored by docker, seems that none of them are needed right now.
  6. Move webhook listener to SSL, create service domain, for example webhooks.wrioos.com(consult @AlexeyAnshakov ), create ssl certificate for it using cloudflare and make it work using apache reverse proxy, then close current webhook port

@michbil
Copy link
Contributor Author

michbil commented Jul 12, 2016

Would also be good if following tasks will be performed in the future:

  1. Dockerize apache, mongo services, so all configuration of the server will be managed by docker.
  2. Automate deploy of docker-compose configurations.

@AlexeyAnshakov
Copy link
Member

webhooks.wrioos.com

@umairadeeb you may create it

@umairadeeb
Copy link
Member

  1. Make docker demon start upon server reboot
  2. Make docker-compose up -d run upon server reboot
  3. Make webhook listener run upon server reboot /etc/init.d/webhooks
  4. Stop opsworks deamon, cause it not needed right now.
  5. Cleanup monit scripts, because services now monitored by docker, seems that none of them are needed right now.
  6. Move webhook listener to SSL, create service domain, for example webhooks.wrioos.com(consult @AlexeyAnshakov ), create ssl certificate for it using cloudflare and make it work using apache reverse proxy, then close current webhook port

Point number 1, 2, 3, and 6 completed.
For point # 4 and 5, I think we should create a separate instance and move our server there instead of using OpsWorks designated instance. For now, we can disable opsworks deployment using travis' configuration file.

Let me know what you guys think.

@AlexeyAnshakov
Copy link
Member

For point # 4 and 5, I think we should create a separate instance and move our server there instead

sounds good if it will speed up instance. @umairadeeb , you may stop instance and create a new one in the same region and type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants