Skip to content
This repository has been archived by the owner on Sep 15, 2018. It is now read-only.

RFC: Deployment #9

Open
watsonarw opened this issue Jul 20, 2017 · 6 comments
Open

RFC: Deployment #9

watsonarw opened this issue Jul 20, 2017 · 6 comments

Comments

@watsonarw
Copy link
Contributor

Where do we want to deploy the demo watch?

Previously we've deployed to heroku using http-server. It's worked, but can be slow, especially considering that heroku goes to sleep if the site is not accessed for more than a few hours.

Given we just have a static site, our options include:

  • Heroku (free)
  • AWS S3 static site (costs a few cents a month)
  • Github pages (free)

Another consideration is that this would be something we'd be doing from CI. The students shouldn't have to worry about how deployment works, just that it happens every time they push commits to master.

@sinan-aumarah
Copy link
Contributor

I had a chat with Adam yesterday and I don't see an issue with github pages as long as each team commits to a separate repo. It's the easiest & fastest option but by doing that the students won't be experiencing a true reflection of how CI/CD pipelines work. Having said that, I still think it's the best option we have.

@watsonarw
Copy link
Contributor Author

watsonarw commented Jul 21, 2017

My idea was that if we go with Github pages, the CI does the build, commit and push. Definitely don't want the students to have to ever build and deploy manually...

@aaron-m-edwards
Copy link
Contributor

I suggested the github pages idea a couple of days ago. As Andrew said we could set up Travis (or whatever we are using now) to make a commit that contains only the build artifacts. We should also probably protect this branch so we don't have accidental pushes to it.

I can try to set it up on this repo this afternoon for a demo

@aaron-m-edwards
Copy link
Contributor

aaron-m-edwards commented Jul 23, 2017

I was playing with deployment to github pages last night, here is what I found

  • The whole build/test/deploy process was written in a circleci.yml file. This would mean that it would be easier to bootstrap new team projects/pipelines
  • We need to use one of our accounts to do the commit (or create a LevelUp github user account)
  • We would manually have to add the Github token environment variable to do the commit as it doesn't seem circleci allows for the encryption of environment variables embedded in the yaml file yet
  • Due to the fact the the levelup watch app is owned by the levelup organisation & it has a url defined in the organisation, it tries to put the deployed website on http://levelup.thoughtworks.com/watch_edition_react/ which is leads to a 404 on our squarespace site. So if we were to go down this route, there would need to be extra setup that end.
  • EDIT CircleCI does not support node 8 yet (so we would have to make the recommended version of node 7.10)

In my opinion CircleCi + Github pages might not be the best way forward. I would

  1. Swap CircleCI to Travis as Travis allows us to encrypt secrets in it's yaml file making bootstrapping easier
  2. Either stick with heroku/http-server if we are fine with the slowness of waking up dynos or move to a single S3 bucket with folders for each of the teams for a negligible cost of a few cents per month.

@aaron-m-edwards aaron-m-edwards mentioned this issue Jul 23, 2017
@aaron-m-edwards
Copy link
Contributor

For the moment I have circleCI running build/test/lint without any deployment

@watsonarw
Copy link
Contributor Author

Would removing the org url make gh-pages work? I'd be happy to do that if it makes things easier. Not sure what others think, but I'm guessing it's only set "because it was there".

@sinan-aumarah sinan-aumarah added this to the Milestone 1 milestone Jul 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants