« Back to Index

[dev deployment workflow process]

View original Gist on GitHub

Tags: #workflow #process #deployment #ci #cd

dev deployment workflow process

Make the changes

    Create a new branch in git
    Make the changes behind a feature flag
    Run unit tests to validate your changes with the feature flag both on and off

Pull request

    Commit the changes
    Push the changes to a remote on github
    Make a pull request
    CI build runs automatically in the background
    Code review
    Repeat this step a few times perhaps
    Merge the changes into git master

CI runs on master

    Install frontend dependencies via npm
    Build/optimize HTML+CSS+JS assets
    Run frontend unit/functional tests
    Install Python dependencies from PyPI
    Run backend unit/functional tests
    Run integration tests against both assets
    Push frontend assets to a CDN
    Build a container for the Python program
    Push container to registry
    Update kubernetes manifest

Replace old code with new code

    Kubernetes spins up some instances of the new container
    Kubernetes waits for those instances to become healthy
    Kubernetes add those instances to the HTTP load balancer
    Kubernetes waits for old instances to become unused
    Kubernetes spins down old instances
    Kubernetes repeats until all old instances have been replaced with new ones

Enable new feature flag

    Enable the new code for just yourself, gain confidence
    Enable the new code for 10% of your users, watch operational and business metrics
    Enable the new code for 50% of your users, watch operational and business metrics
    Enable the new code for 100% of your users, watch operational and business metrics
    Finally, go through the entire process again to remove the old code and the feature flag