Giter Site home page Giter Site logo

one-and-done's Introduction

One and done

Your mission, should you choose to accept it, is to create a single script that takes a brand new VM, and creates a fully-functioning production site, all by running a single command. In other words, setup should not require vagrant ssh, or any other interaction.

Workflow

  1. Modify provision.sh, etc.
  2. Run vagrant up.
  3. Visit your VM's IP in your browser, and you should see "Hello world!"
  4. If that doesn't work, run a vagrant destroy and repeat from step 1.

This turnaround time is slow, so you might want to run the commands by hand within vagrant ssh, then move them into the provisioning script as you finalize them.

Tutorials

These may help:

Tips

  • There are a lot of Python WSGI web server options. Unless you specifically want to try a different one, go with Gunicorn (pronounced "G-unicorn").
  • You need to reload nginx configuration after you modify it for the changes to be picked up.
  • The vagrant-address plugin is useful for getting the IP address of your VM.

Next steps

Once you get the above working locally:

  1. Use Vagrant to deploy the site to Amazon Web Services (AWS)
    • Be very careful not to commit your AWS credentials to the repository.
  2. Run the site in a Docker container

Discussion questions

  • What is the point of this exercise?
  • What is each command in your provisioning script doing?
  • How can you verify that each command is doing what you intend for it to? In other words, how would you test/troubleshoot this?
  • Why do we need nginx, Gunicorn, etc? Why not just use flask run?

one-and-done's People

Contributors

afeld avatar

Watchers

James Cloos avatar Abhi Nandam 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.