Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Automating deployments to the beta site on update to master #388

Closed
jglovier opened this issue Mar 21, 2016 · 19 comments
Closed

Automating deployments to the beta site on update to master #388

jglovier opened this issue Mar 21, 2016 · 19 comments
Assignees
Labels
devops issue/pull request that includes changes to documentation to devops processes v2.x wontfix indicates an issue/pull request will not be worked on
Milestone

Comments

@jglovier
Copy link
Member

Expected behavior: When we merge pull requests to master, the system should deploy the latest to the beta site.

Actual behavior: We have to manually deploy to the beta site.

We can easily accomplish this with GitHub webhooks.

Some links for reference:

@tangollama tangollama added help wanted indicates that an issue is open for contributions LOE: < 1 week labels Apr 22, 2016
@tangollama tangollama added this to the HospitalRun 1.0 milestone Apr 22, 2016
@tangollama tangollama added the devops issue/pull request that includes changes to documentation to devops processes label May 13, 2016
@ThomasWunderlich
Copy link

@jglovier Do you have a script you currently run to deploy? Or alternatively documented deployment steps? I went looking through the github repo and I wasn't sure what you're currently using for hosting or deployment of the beta site.

@jglovier
Copy link
Member Author

jglovier commented Sep 8, 2016

@ThomasWunderlich it's pretty manual right now. I think @jkleinsc just logs into our host and git pulls basically LOL. 😄 cc @jkleinsc to confirm...

@ThomasWunderlich
Copy link

Well that at least confirms you're using a vm then and not docker. It makes the deployment process a bit easier

@jkleinsc
Copy link
Member

jkleinsc commented Sep 8, 2016

@ThomasWunderlich @jglovier yup... right now I do the following:

  1. Manual git pull on https://github.com/HospitalRun/hospitalrun-server
  2. npm install
  3. service hospitalrun restart

@jglovier
Copy link
Member Author

jglovier commented Sep 9, 2016

Ideally we'd use something like Heaven so we can deploy via Hubot in Slack.

@parkr
Copy link

parkr commented Sep 23, 2016

I would be interested in helping with this today. A v0.1 could replicate what @jkleinsc does above but via a cron job. That would be very simple to setup. Everything is public so it could be as simple as:

cat > /etc/cron.d/update_server <<EOS
[email protected]
0 * * * * root cd /data/hospitalrun-server && git pull origin master && npm install && service hospitalrun restart
EOS

A v1.0 could be:

  • Stand up Heaven in Heroku. Give it a db & configure the apps needed to deploy.
  • Configure webhook to hit Heaven. I believe it's just the Deployment event.
  • Configure hubot-deploy in HospitalRun Hubot.
  • ... anything else?

@parkr
Copy link

parkr commented Sep 23, 2016

OK, after talking to @jglovier and @tangollama, it sounds like a general-purpose solution for deploying instances of hospitalrun-server would be better. For any instance that the HospitalRun team manages, it will be registered with heaven during the provisioning. Then, .deploy hospitalrun-server to prod would deploy via Heaven to all the hosted unites HospitalRun

  • Setup a heaven Droplet. (Thanks @tangollama!)
  • Install Docker (instructions used)
  • Install Heaven via Docker (instructions used).
  • Launch with docker run --name heaven --net heaven --publish 80:80 --env-file ./env.list -d emdentec/heaven
  • Launch workers with docker run --name heaven-worker-1 --net heaven --env-file ./env.list emdentec/heaven "rake" "resque:work" "QUEUE=*" && docker run --name heaven-worker-2 --net heaven --env-file ./env.list emdentec/heaven "rake" "resque:work" "QUEUE=*"
  • Configure Heaven to know about hospitalrun-server. This requires a deployment private key (it's SSH, right?) and perhaps a Capfile.
  • Add hubot-deploy to HospitalRun's Hubot.
  • Get hubot-deploy talking to Heaven.

@tangollama tangollama added in progress indicates that issue/pull request is currently being worked on and removed help wanted indicates that an issue is open for contributions labels Sep 24, 2016
@tangollama
Copy link
Member

Note: @parkr is working on this.

@jglovier jglovier assigned jglovier and unassigned jglovier Sep 24, 2016
@jglovier
Copy link
Member Author

@parkr I started installing hubot-deploy on our existing [Slack hubot(https://github.com/HospitalRun/hospitalbot) when I realized you created the @hospitalrunbot user. Should I deprecate the hospitalbot repo in favor of that new bot user?

@tangollama
Copy link
Member

@parkr @jglovier what do we need to do to finish this?

@tangollama
Copy link
Member

@parkr @jglovier, consider this a very friendly bump. I'm happy to work some of this if that's feasible.

@jpeterson88
Copy link

Hey there, just bumping this to see where it currently stands @jglovier

@jglovier
Copy link
Member Author

jglovier commented Apr 6, 2018

@jpeterson88 AFAIK there hasn't been any new progress on this since the last comments. If you're interested in addressing it, that'd be awesome.

@parkr anything @jpeterson88 should know from your previous work on this?

@jpeterson88
Copy link

jpeterson88 commented Apr 6, 2018

Sweet. Yeah I'd love to take a stab at this. I see there is a discussion of using Heaven, are we set on that? Why not something like Kubernetes + Helm? We could hook into Hubot as well. Any additional info the team has would be much appreciated. Assuming I'll need credentials or whatever to where the site is hosted, who should I reach out to @jglovier ?

@MatthewDorner
Copy link
Contributor

Sorry, clicked close button by mistake.

@jglovier
Copy link
Member Author

jglovier commented Aug 7, 2018

I see there is a discussion of using Heaven, are we set on that? Why not something like Kubernetes + Helm?

I'm open to other solutions, I just proposed Heaven because it's what we used internally at GitHub and I was familiar with it a bit. But I'm not actively working on this issue and not strongly opinionated as to implementation details, so definitely open to other solutions that make sense. 👍

Assuming I'll need credentials or whatever to where the site is hosted, who should I reach out to @jglovier ?

Good question. @jkleinsc or @tangollama would have credentials for those.

@stukalin stukalin self-assigned this Aug 30, 2018
@stale
Copy link

stale bot commented Aug 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix indicates an issue/pull request will not be worked on label Aug 7, 2019
@fox1t fox1t self-assigned this Aug 7, 2019
@stale stale bot removed the wontfix indicates an issue/pull request will not be worked on label Aug 7, 2019
@fox1t fox1t added v2.x and removed Hack Day in progress indicates that issue/pull request is currently being worked on labels Aug 7, 2019
@fox1t
Copy link
Member

fox1t commented Aug 7, 2019

@tehkapa it's your duty!

@matteovivona matteovivona self-assigned this Aug 7, 2019
@matteovivona matteovivona modified the milestones: HospitalRun 1.0, v2.0.0 Aug 7, 2019
@stale
Copy link

stale bot commented Oct 6, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix indicates an issue/pull request will not be worked on label Oct 6, 2019
@fox1t fox1t closed this as completed Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
devops issue/pull request that includes changes to documentation to devops processes v2.x wontfix indicates an issue/pull request will not be worked on
Projects
None yet
Development

No branches or pull requests

10 participants