fly icon indicating copy to clipboard operation
fly copied to clipboard

Continuous Deployment with Travis

Open karllhughes opened this issue 5 years ago • 13 comments

Outline, see: https://github.com/superfly/fly/issues/285

karllhughes avatar Jul 21 '20 15:07 karllhughes

@AdeyinkaAdegbenro will be taking this article and adding an outline later this week. 🎉

karllhughes avatar Jul 22 '20 13:07 karllhughes

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 avatar Jul 23 '20 21:07 AdeyinkaAdegbenro

@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.

karllhughes avatar Jul 24 '20 09:07 karllhughes

@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.

AdeyinkaAdegbenro avatar Jul 24 '20 11:07 AdeyinkaAdegbenro

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 avatar Jul 26 '20 20:07 karllhughes

@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.

AdeyinkaAdegbenro avatar Jul 27 '20 00:07 AdeyinkaAdegbenro

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!

karllhughes avatar Jul 27 '20 02:07 karllhughes

@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 avatar Jul 27 '20 09:07 codepope

@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.

AdeyinkaAdegbenro avatar Jul 27 '20 10:07 AdeyinkaAdegbenro

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!

karllhughes avatar Aug 09 '20 16:08 karllhughes

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 avatar Aug 09 '20 16:08 mrkurt

@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!

karllhughes avatar Aug 09 '20 16:08 karllhughes

Readme in the same directory in the same repo works great. Just name it README.md instead of lowercase.

mrkurt avatar Aug 09 '20 16:08 mrkurt