Continuous Deployment with Travis
Outline, see: https://github.com/superfly/fly/issues/285
@AdeyinkaAdegbenro will be taking this article and adding an outline later this week. 🎉
Outline
- Introduction
- What is Continuous Deployment and why is it Important?
- What is Travis CI? Why use it for CI/CD?
- Why use Fly?
- Installation
- Prerequisites
- Install Flyctl as the CLI for managing fly apps
- Connect Travis CI to Github/Bitbucket
- Deployment
- Creating a new app
- Version control with Github/BitBucket
- Connecting Travis CI to Github/BitBucket
- Packaging the app as a docker image with Travis CI
- Configuring the application for Fly with Travis CI
- Deploying the application with Travis CI and Github on merge
- Conclusion
- Further reading
@AdeyinkaAdegbenro this looks okay to me. You might not need to cover installing Docker locally, but if it's needed, you can reference it in the prerequisites.
@AdeyinkaAdegbenro this looks okay to me. You might not need to cover installing Docker locally, but if it's needed, you can reference it in the prerequisites.
Alright.
For your demo app, you can use @codepope's Fly Greeting app here: https://github.com/fly-examples/flygreeting
You don't need to explain the application in depth or how it works, you can just copy the files to get your app started.
@karllhughes, I wrote my first draft yesterday already, using this one https://github.com/fly-examples/hellofly. Is it required to use the Fly Greeting app? If it is, I'm happy to change it.
Oh nice, @AdeyinkaAdegbenro that's fine then.
When you have a draft ready for me to review, just send it over to my email and we'll do direct feedback there. Thanks!
@AdeyinkaAdegbenro the Fly greeting app has the advantage of having a simple set of tests built in and a REST API which makes it testable once deployed. (And everyone, feel free to expand the greetings JSON file...)
@codepope I'll be replacing the hellofly app in the tutorial with the Fly Greeting app since a testable app helps demonstrate continuous deployment better.
@karllhughes I'll send what I have written at the once I'm done replacing the app.
One question on the code samples for this article, @mrkurt or @codepope:
Because this tutorial uses the Flygreeting app, the only difference is a couple of new files we added to configure Travis and deploy. When we submit the code repository would you like all the files including those from flygreeting? Or just the new files we added?
Thanks!
I think the best way to do this might be to add new directory + REAMDE to the flygreeting app. I think most CI systems use directories like .travis and .github already. Do you think that will work?
That'll let us actualy configure them and keep them running down the road too. ;)
@mrkurt that sounds like a great idea. So, we'll make a PR against the flygreeting app with a new directory called .travis that holds our configuration, deployment script, readme.md file, and image files for the article?
Or should we put the article in a separate repo?
Just making sure whatever we do fits your publishing workflow. Thanks!
Readme in the same directory in the same repo works great. Just name it README.md instead of lowercase.