Code Monkey home page Code Monkey logo

carpe-noctem's People

Contributors

aallbrig avatar mattattaq avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

gwenf mattattaq

carpe-noctem's Issues

Create Jenkins Job Groups, plug in a Builder and create a Jenkins view

Create Jenkins Job Groups, plug in a Builder and create a Jenkins view

We must

  1. Organize current Jenkins Jobs (JJ) into the phases that represent a automated, continuous delivery process. To this end we must create new Jenkins Job Groups (JJG)(http://docs.openstack.org/infra/jenkins-job-builder/definition.html#job-group), new Jenkins Views (JV)(http://docs.openstack.org/infra/jenkins-job-builder/definition.html#views), and new Jenkins Porjects (JP)(http://docs.openstack.org/infra/jenkins-job-builder/definition.html#project)

    Therefore we must fill in any missing JJ from this organized list of JJs.

    ---
    - All in list are a JJG(
        Acceptance Phase(
          checkout to disk,
          static code analysis of code on disk,
          unit test(
            api contracts are respected(
              valid request -> valid response,
              invalid request -> valid, expected response
            ),
            status codes all green for all pages and APIs,
            low fidelity highly mocked or stubbed UI tests,
            light application logic tests or whatever else
          ),
          compile source code on disk to distributable artifacts on disk,
          package distributable artifacts to appropriate external repository
        ),
        Load & Performance Phase(
          spin up target environment with infrastructure,
          create or migrate DB and populate with anonymized production data,
          deploy artifacts onto provisioned infrastructure (staging),
          health test(
            infrastructure exists,
            status codes all green for all system pages and APIs,
            third-party vendors are 200 OK
          ),
          functional test(
            api contracts are respected(
              valid request -> valid response,
              invalid request -> valid, expected response
            ),
            Can a selenium bot do all happy UX paths through UI?,
            Can a selenium bot ensure past problems don't exist related to UI?,
            Are third party vendor software panels getting expected traffic?,
            Are third party vendor software panels getting expected results?,
            Can a selenium bot play test through all levels?
          ),
          (performance test)(under ideal conditions)(
            Do site assets deliver in acceptable time under condition?,
            Do deliverables deliver in acceptable time under condition?,
            Is game running at 60 FPS across all playable contexts?,
            Are API response times still great?
          ),
          load test(
            (performance test)(under load conditions),
            Can system handle production-like traffic nominally?,
            Can system infrastructure handle a huge spike in traffic appropriately?,
            Optional manual exploration can now occur (notify stakeholders)
          )
        ),
        Release Phase(
          Rollout new artifacts to production by means of a BLUE/GREEN deploy,
          Optional "tear down staging until next change or manual intervention" can occur now (notify stakeholders)
        ),
        Production Monitoring Phase (continuous)(
          (performance test)(under production conditions),
          functional test() every so often,
          performance test() to collect additional system metrics,
          persist log history(
            for each log service in [ELK, CloudWatch infrastructure logs]
            Persist in AWS Glacier if log.date in log service is > 6 months
          )
        )
      )
    - All in list are JV(
        Available atomic jobs or phases I can rerun manually and can be rerun,
        Current environment status(
          staging,
          production
        )
      )
    - All in list are JP(
        Automated Continuous Delivery Pipeline
      )
    
  2. Provision Jenkins VM with HipChat plugin (Future issue, probably)

  3. Integrate with a chat client (Slack? Discord?) to log a historic build record (and get "CloudOps" strategies going). (Future issue, probably)

    This way we can ensure we are able to talk about all deploys surrounding a deploy if things go wrong (like if we merge stage to master and the value stream breaks down at a particular location). The first place to go will be the "#deployments" channel.

    More "master is broken" strategies include:

    • globally an automated "master is broken" announcement so everyone can debug what happened to unblock the value stream. (Future issue, probably)
    • email all registered emails that "master is broken" and a link to the #deployments channel. (Future issue, probably)
    • SMS the core maintainers help resolve,. (Future issue, probably)

Provision Web Dev VM

Provision Web Dev VM

  1. This VM will have exposed ports and synced folders from guest OS to host OS. Use the Vagrantfile.j2 to modify target VM. At the very least for the developer's OS (MacOSX represent).

  2. This VM will have developer friendly versions of software. JDK, endless watcher versions of software that restart on failure (e.g. nodemon or activator or sbt) is a must.

  3. The VM will display developer framework warnings on all relevant ports.

    Browser extensions always use port 35729
    according to feedback.livereload.com

    Therefore ports such as these items will have to be exposed

    1. LiveReload port: 35729 (pass through to host OS)
    2. HTTP server port: 8000 (pass through to host OS)
    3. HTTPS server port: 8443 (pass through to host OS)
    4. Hot swapping resource port: todo
    5. easy state import and export statements to be used in acceptance testing
  4. And updated Vagrantfile will be committed to the project (so it's easy for other developers to run sh stop && sh run.sh to redeploy.)

Provision Build Dev VM

Provision Build Dev VM

  1. This VM will have exposed ports and synced folders from guest OS to host OS. Use the Vagrantfile.j2 to modify target VM. At the very least for the developer's OS (MacOSX represent).

    ports like

    1. http://localhost.com (port 80) - For the production artifacts with maximum core business value
    2. https://localhost.com (port 443) - For the production artifacts with maximum core business value
    3. http://localhost.com:7080 ELK (ElasticSearch, Logstash, Kibana monitoring system)
    4. http://localhost.com:7443 Secure, hardened ELK
    5. http://localhost.com:111080 Consul (feature flag framework)
    6. https://localhost.com:111443 Secure, hardened Consul server
    7. TODO: Add any other open source frameworks that help to this section.
  2. This VM will have production sturdy versions of software end software. Perhaps even Docker images working to use up a maximum amount of VM resources.

  3. The VM will expose all devops/ops tooling used to diagnose production issues.

  4. An updated Vagrantfile will be committed to the project to run this awesome "build box".

Set up initial Ubuntu OS provision script in Ansible

Set up initial Ubuntu OS provision script in Ansible

  1. run run.sh or other setup script to provision your python enabled OS (Windows may need to install python and pip) and see a failure for Ubuntu or a blank success.
  2. Find out target OS name in ansible ansible all -m setup -a 'filter=ansible_distribution' if you have the Vagrant VMs operational or see this sample run
    > ansible all -m setup -a 'filter=ansible_distribution'
    
    # example run
    jenkins-dev | SUCCESS => {
        "ansible_facts": {
            "ansible_distribution": "Ubuntu"
    },
    "changed": false
    }
    127.0.0.1 | SUCCESS => {
        "ansible_facts": {
            "ansible_distribution": "MacOSX"
        },
        "changed": false
    }
    database-dev | SUCCESS => {
        "ansible_facts": {
            "ansible_distribution": "Ubuntu"
        },
        "changed": false
    }
    build-dev | SUCCESS => {
        "ansible_facts": {
            "ansible_distribution": "Ubuntu"
        },
        "changed": false
    }
    web-dev | SUCCESS => {
        "ansible_facts": {
            "ansible_distribution": "Ubuntu"
        },
        "changed": false
    }
    # Gotta love having many models here
    
  3. Identify Ansible roles in Ansible Galaxy (the package manager) for the different software required to set this project up. If you find any, throw those in the role's meta folder as a dependency. For software this will be a one line change, for other multi-step processes it may require writing some ansible tasks (represented in the tasks folder of any role).
  4. Pat yourself on the back and send in a PR. Thanks for rocking a Linux distro!

Set up initial Windows OS provision script in Ansible

Set up initial Windows OS provision script in Ansible

  1. run run.sh or other setup script to provision your python enabled OS (Windows may need to install python and pip) and see a failure for Windows or a blank success.

  2. Find out target OS name in ansible ansible all -m setup -a 'filter=ansible_distribution' if you have the Vagrant VMs operational or see this sample run

    > ansible all -m setup -a 'filter=ansible_distribution'
    
    # example run
    jenkins-dev | SUCCESS => {
        "ansible_facts": {
            "ansible_distribution": "Ubuntu"
    },
    "changed": false
    }
    127.0.0.1 | SUCCESS => {
        "ansible_facts": {
            "ansible_distribution": "MacOSX"
        },
        "changed": false
    }
    database-dev | SUCCESS => {
        "ansible_facts": {
            "ansible_distribution": "Ubuntu"
        },
        "changed": false
    }
    build-dev | SUCCESS => {
        "ansible_facts": {
            "ansible_distribution": "Ubuntu"
        },
        "changed": false
    }
    web-dev | SUCCESS => {
        "ansible_facts": {
            "ansible_distribution": "Ubuntu"
        },
        "changed": false
    }
    # Why would I have a Windows VM?
    
  3. Identify Ansible roles in Ansible Galaxy (the package manager) for the different software required to set this project up. If you find any, throw those in the role's meta folder as a dependency. For software this will be a one line change, for other multi-step processes it may require writing some ansible tasks (represented in the tasks folder of any role).

    I would recommend using Chocolatey as the package management software because it handles Windows. It is to Windows as Homebrew is to MacOSX.

  4. Pat yourself on the back and send in a PR. Many thanks because I may never have gotten around to it otherwise. I mean, I guess if I wanted to code on my gaming machine but why otherwise? <3

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.