Giter VIP home page Giter VIP logo

golden-path's Introduction

CircleCI

Note: If somethings not working, you get stuck, etc feel free to file an issue or even better a PR ^^. I won't be super timely because in crunch time on a few projects through March, but will periodically check it out! Cheers <3

Tutorial on DevOps for Denver Elixir Meetup

Talk covers weeks of content in 30 minutes, so we'll introduce practical abstractions where needed to build an entire devOps/CI/CD Pipeline.

These abstractions and tool choices provide a fully-functional pipeline, but also allow an engineer to deep dive into whatever particular area of the pipeline they're more interested in, without losing benefits of the full integration.

  1. To Abstract Releases: Distillery
  2. Build Verification Tools: Compiler, Credo, Dialyzer, ExUnit + Coveralls
  3. CI Server: Hosted CircleCI Free Tier
  4. Cloud Management + Machines: Gigalixir Free Tier + Libcluster
  5. If time, talk hot code swaps or more real distribution!
  6. Worth talking about environment replication, too app specific to template though.

If you just want a release-ready template that can be remotely deployed to Gigalixir as is, do this:

  1. Clone the project $ git clone https://github.com/joeyrosztoczy/golden-path.git
  2. $ cd golden-path
  3. The final setup is the current master branch

Test your project / dev server before things get wild:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Install Node.js dependencies with cd assets && npm install
  • Start Phoenix endpoint with mix phx.server
  1. Manually verify the build with $ mix verify_build
  2. Setup a free CircleCI account: https://circleci.com/docs/2.0/first-steps/#section=getting-started
  3. Setup a free Gigalixir account: https://gigalixir.readthedocs.io/en/latest/main.html#getting-started-guide
  4. Create the Gigalixir App: https://gigalixir.readthedocs.io/en/latest/main.html#how-to-create-an-app
  5. Create a free Postgresql db: https://gigalixir.readthedocs.io/en/latest/main.html#how-to-provision-a-free-postgresql-database
  6. Deploy your app via the gigalixir remote with $ git push gigalixir master
  7. Verify the deployment with $ gigalixir logs -a golden-path
  8. Assuming you've added SSH keys, kick off Observer with $ gigalixir ps:observer -a golden-path (and select the remote node to inspect).

If you want to follow along or build it out step by step, do this:

  1. Clone me $ git clone https://github.com/joeyrosztoczy/golden-path.git
  2. $ cd golden-path
  3. Start at the right spot $ git checkout s1-starting-fresh

Test your project / dev server before things get wild:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Install Node.js dependencies with cd assets && npm install
  • Start Phoenix endpoint with mix phx.server
  1. Distillery is going to help us perform the grunt work of building the Erlang Release. It's currently the only dependency added to the project.

    • First, run the Distillery provided command $ mix release.init from your project root. We're creating a rel/ directory, and a rel/config.exs script. We'll use this directory to store such awesomeness as: (1) runtime configuration for our application, (2) configuration parameters for the Erlang VM, (3) commands that we can run remotely such as seeding, etc.
  2. To see the build verifcation task and updates, review this PR: joeyrosztoczy#3

  3. To see the configuration for CircleCI, and be able to launch a project there, review: joeyrosztoczy#4

  4. To launch a remote deployment via Gigalixir, and use cluster-based tools like Observer, review: joeyrosztoczy#5

golden-path's People

Contributors

joeyrosztoczy avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.