fly icon indicating copy to clipboard operation
fly copied to clipboard

Continuous deployment with CircleCI

Open karllhughes opened this issue 4 years ago • 8 comments

Here's a tentative outline:

  • Introduction
    • What is CD? Why it's important? (Just briefly)
    • What is CircleCI? Why use it for CI/CD?
    • Why host on the edge? Why Fly? (Again, briefly but I think it's important to give context)
  • How to Deploy to Fly using CircleCI
    • Create a new simple app to deploy to Fly: https://fly.io/docs/hands-on/create-app/
    • Introduction to CircleCI config: https://circleci.com/docs/2.0/configuration-reference/
      • Building Docker images with CircleCI: https://circleci.com/docs/2.0/building-docker-images/
    • Setting up a config file
    • Testing that it works: make a change, re-deploy it, see the change
  • Conclusion

karllhughes avatar Jul 21 '20 15:07 karllhughes

CircleCI seems tricky with Docker, the people we know who use it end up doing remote builds with flyctl (unintentionally). This one should show how to do in-Circle Docker builds. Bonus points if it can do Docker layer caching.

You can actually build with Docker and deploy that image with flyctl, if it helps. Basically:

docker build . -t myapp/test:1234
flyctl deploy -i myapp/test:1234

mrkurt avatar Jul 21 '20 15:07 mrkurt

@ammezie will be helping out with this post. He'll start by creating a more detailed outline here in the Github issue.

karllhughes avatar Jul 21 '20 20:07 karllhughes

Hi there, I'm just putting together a simple app which you may be able to use (it's an app where you can look up countries, languages and how you say hello in each).

codepope avatar Jul 21 '20 21:07 codepope

Hi @karllhughes, here's the outline as requested:

  • Introduction - brief on what is CI/CD and what the article will cover
  • What we’ll be deploying - a brief look at the app to deploy
  • Dockerizing the application - covers packaging the application as a docker image
  • Getting started with Fly - covering what and why Fly, and creating a new app on Fly
  • Getting started with CircleCI - covers what is CircleCI and creating a new project
  • Configuring the application on CircleCI - configuring the app for deployment
  • Testing the deployment - covers testing the deployment pipeline
  • Conclusion - overview of everything the article covered

ammezie avatar Jul 26 '20 17:07 ammezie

@ammezie Just a couple pieces of feedback on your outline:

  1. Make sure you use CircleCI to build the Docker image and then deploy it. See Kurt's comment above and the CircleCI Docker documentation to make sure this is the way you do it. Let us know if you have questions though.
  2. If @codepope's application is done before you start writing, you can use that. Otherwise, you can get started with the Fly demo app used here. We can switch out the app later if need be.

Thanks!

karllhughes avatar Jul 26 '20 19:07 karllhughes

The demo app is done - https://github.com/fly-examples/flygreeting - feedback and PRs welcomed of course.

codepope avatar Jul 26 '20 19:07 codepope

Ah, great, thanks @codepope!

karllhughes avatar Jul 26 '20 20:07 karllhughes

@karllhughes got it!

ammezie avatar Jul 26 '20 20:07 ammezie