<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Gogo Tech - Medium]]></title>
        <description><![CDATA[We build the software, infrastructure, and services for Gogo in-flight connectivity for people and aircraft. - Medium]]></description>
        <link>https://medium.com/gogoair-tech?source=rss----5bf066195983---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Gogo Tech - Medium</title>
            <link>https://medium.com/gogoair-tech?source=rss----5bf066195983---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 06:13:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/gogoair-tech" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Artifactory Retention Policies with Lavatory]]></title>
            <link>https://medium.com/gogoair-tech/artifactory-retention-policies-with-lavatory-f1a134c38c7f?source=rss----5bf066195983---4</link>
            <guid isPermaLink="false">https://medium.com/p/f1a134c38c7f</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[artifactory]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Doug Campbell]]></dc:creator>
            <pubDate>Mon, 13 Nov 2017 17:17:13 GMT</pubDate>
            <atom:updated>2017-11-13T17:25:51.432Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xmz-ksbqJrcsgwYLMLiXeA.jpeg" /></figure><p><a href="https://github.com/gogoair/lavatory">Lavatory</a> is a new tool we created to handle retention policies in <a href="https://www.jfrog.com/artifactory/">Artifactory</a>. When you have a continuous delivery model it is easy to end up with thousands and thousands of old and broken artifacts. At Gogo we have over 45,000 artifacts spread across approximately 50 repositories, all of which need different levels of retention. Lavatory was created to solve this issue by allowing highly customizable and repository specific retention policies.</p><p>Lavatory is open source as we felt other organizations are likely experiencing similar problems, and we were unable to find any other tools that met our needs.</p><ul><li><a href="https://github.com/gogoair/lavatory">gogoair/lavatory</a></li><li><a href="http://lavatory.readthedocs.io/en/latest/">Welcome to lavatory&#39;s documentation! - lavatory documentation</a></li></ul><h3>Why You Need Retention Policies</h3><p>Lavatory was created to solve the issue of artifact retention in Artifactory. Retention policies are necessary for the following reasons:</p><ul><li>Too many artifacts in a repository can cause slow indexing and make delivering applications slower.</li><li>Indefinitely keeping all artifacts leads to a build up of stale or broken artifacts. With how often we build and deploy, most artifacts would never make it to production and had no need for long term retention</li><li>Storage is not free. Artifacts can be very large and in order to control costs we need to eventually purge old artifacts.</li></ul><h3>Lavatory Features</h3><p>Lavatory has one main goal, clean up Artifactory with repositority specific retention policies. It has the following features to enable this:</p><ul><li>Uses Python plugins for repository policies. One plugin per repository that can have as much Python logic as necessary</li><li>Time-based retention. Easy helper function for applying a time-based retention policy, such as “keep all artifacts created in the last 120 days”.</li><li>Count-based retention. Easy helper function for keep last N number of artifacts, such as “keep the last 5 built artifacts</li><li>AQL based retention. You can use the <a href="https://www.jfrog.com/confluence/display/RTF/Artifactory+Query+Language">Artifactory query language</a> for searching for artifacts to delete. This can be combined with time-based and count-based retention.</li><li>A default policy that applies to all repos without a specific policy.</li></ul><h3>Creating a Policy</h3><p>Each policy in Lavatory is a Python plugin. The plugin should be named &lt;repo_name&gt;.py, replacing — in the repository name with _ . Each policy needs one function, def purgelist(artifactory) and this needs to return a list of artifacts to delete. Other than that, the policies can do anything that Python can do. The default policy is named default.py and applied to all repositories without a specific retention policy.</p><p><a href="http://lavatory.readthedocs.io/en/latest/policies/index.html">Creating Retention Policies - lavatory documentation</a></p><h4>Example Policies</h4><p>Below are some example policies to show how these can be used.</p><p><strong>Keep last 120 days of artifacts</strong></p><pre><strong>def</strong> <strong>purgelist</strong>(artifactory):<br>    &quot;&quot;&quot;Policy to purge all artifacts older than 120 days&quot;&quot;&quot;<br>    purgeable <strong>=</strong> artifactory<strong>.</strong>time_based_retention(keep_days<strong>=</strong>120)<br>    <strong>return</strong> purgeable</pre><p><strong>Keep 5 most recent artifacts</strong></p><pre><strong>def</strong> <strong>purgelist</strong>(artifactory):<br>    &quot;&quot;&quot;Policy to keep just the 5 most recent artifacts.&quot;&quot;&quot;<br>    purgeable <strong>=</strong> artifactory<strong>.</strong>count_based_retention(retention_count<strong>=</strong>5)<br>    <strong>return</strong> purgeable</pre><p><strong>Purge artifacts based on environments deployed to</strong></p><pre><strong>def</strong> <strong>purgelist</strong>(artifactory):<br>    &quot;&quot;&quot;If deployed to prod, keep artifact forever,<br>    if deployed to stage, keep 30 days,<br>    if never deployed, keep 14 days.&quot;&quot;&quot;<br><br>    not_deployed <strong>=</strong> [ { &quot;@deployed&quot;: { &quot;$nmatch&quot;: &quot;*&quot; }}]<br><br>    only_dev <strong>=</strong>  [ { &quot;@deployed&quot;: { &quot;$match&quot;: &quot;*stage*&quot;} },<br>                { &quot;@deployed&quot;: {&quot;$nmatch&quot;: &quot;*prod*&quot;} } ]<br><br>    undeployed <strong>=</strong> artifactory<strong>.</strong>time_based_retention(keep_days<strong>=</strong>14,<br>                                        extra_aql<strong>=</strong>not_deployed)<br>    <br>    only_stage <strong>=</strong> artifactory<strong>.</strong>time_based_retention(keep_days<strong>=</strong>30,<br>                                            extra_aql<strong>=</strong>only_dev)<br><br>    all_purgable <strong>=</strong> undeployed <strong>+</strong> only_stage<br>    <strong>return</strong> sorted(all_purgable, key<strong>=lambda</strong> k: k[&#39;path&#39;])</pre><p><strong>Move artifacts to different repository after 3 days</strong></p><pre>def purgelist(artifactory):<br>    &quot;&quot;&quot;Moves artifacts to yum-local after 3 days.&quot;&quot;&quot;<br>    movable = artifactory.time_based_retention(keep_days=3)<br>    artifactory.move_artifacts(artifacts=movable,<br>                               dest_repository=&#39;yum-local&#39;)<br>    return []</pre><h3>Running Lavatory</h3><p>Lavatory is just a CLI tool. We run this nightly in a Jenkins job but could be done from any shell.</p><p>Lavatory can be installed from PyPI: pip install lavatory</p><p>Authentication to Artifactory looks for 3 environment variables: ARTIFACTORY_URL, ARITFACTORY_USERNAME, ARTIFACTORY_PASSWORD</p><h4>Purging Artifacts</h4><p>The purge command will run your retention policies and delete the artifacts. This runs in dry mode by default so you must include --nodryrun if you want to actually remove the artifacts.</p><p>lavatory purge --policies-path /path/to/policies</p><p>If you want to only run against specific repos, you add multiple --repo &lt;repo_name&gt; flags to the command. If not provided Lavatory will run against all repositories.</p><h4>Listing Policies</h4><p>You can use the policies command if you want to list all policies and their descriptions but not run the policies. This is useful for generating a list of all policies for documentation purposes. This uses the policy functions docstring for determining the policy description.</p><p>lavatory policies --policies-path /path/to/policies</p><p>This will return a JSON list of all repositories and the policies that apply to them.</p><h3>Conclusion</h3><p>If you are interested in Lavatory take a look at the <a href="http://lavatory.readthedocs.io/en/latest/">documentation</a> for more information. We are always open to contribution and actively review any GitHub issues. Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1a134c38c7f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gogoair-tech/artifactory-retention-policies-with-lavatory-f1a134c38c7f">Artifactory Retention Policies with Lavatory</a> was originally published in <a href="https://medium.com/gogoair-tech">Gogo Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Super Secret Dynamic Secrets with Vault]]></title>
            <link>https://medium.com/gogoair-tech/super-secret-dynamic-secrets-with-vault-cf6f29fefc8f?source=rss----5bf066195983---4</link>
            <guid isPermaLink="false">https://medium.com/p/cf6f29fefc8f</guid>
            <category><![CDATA[vault]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[secrets]]></category>
            <dc:creator><![CDATA[Doug Campbell]]></dc:creator>
            <pubDate>Thu, 06 Jul 2017 21:06:56 GMT</pubDate>
            <atom:updated>2017-07-06T21:06:56.047Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v3CgDzRaJZyJ8yR4yBqW_A.jpeg" /></figure><p><a href="https://www.vaultproject.io/">Vault</a> is a really neat tool from HashiCorp for managing secrets. It aims to solve common problems around key rotations, provisioning, revocations, auditing and more. One of my favorite features from Vault is the ability to generate temporary credentials on demand for a variety of different backends.</p><h3>Dynamic Backends</h3><p>Vault ships with some useful backends for managing dynamic secrets. Dynamic backends generate secrets on demand. For example, every time you request the username and password for a database, Vault generates new ones and returns that to the application. Here’s is a list of some of the dynamic backends that Vault ships with:</p><ul><li>AWS</li><li>Relational Databases (MySQL, PostgreSQL, MSSQL)</li><li>MongoDB</li><li>Cassandra</li><li>PKI (Certificates)</li><li>RabbitMQ</li><li>Consul</li></ul><h4>Why?</h4><p>Dynamic passwords provide a bunch of benefits:</p><ul><li>No need to write down, store, or share passwords</li><li>Enables very short lived passwords, less exposure if compromised</li><li>For distributed applications, every instance gets unique credentials</li><li>Constantly changing and expiring usernames/passwords are much harder to brute force</li><li>Automatic password rotation/expiration</li><li>Better auditing trail</li></ul><h3>PostgreSQL Example</h3><p>Vault has the ability to provide dynamic database usernames and passwords. This means that a new username and password is generated and returned every time you read a secret from Vault, and it will handle revocations from the database automatically. Vault uses a plugin abstraction for databases and supports MySQL, PostgreSQL, MSSQL, and others out of the box. To setup dynamic database passwords, follow these steps:</p><ol><li>Mount the database backend to Vault</li><li>Configure connection to database</li><li>Configure a role in Vault for generating credentials</li></ol><pre>$ vault mount database<br>Successfully mounted &#39;database&#39; at &#39;database&#39;!</pre><pre>$ vault write database/config/postgresql \<br>    plugin_name=postgresql-database-plugin \<br>    allowed_roles=&quot;readonly&quot; \<br>    connection_url=&quot;postgresql://root:pass@example.com:5432/&quot;</pre><pre>$ vault write database/roles/readonly \<br>    db_name=testDb \<br>    creation_statements=&quot;CREATE ROLE \&quot;{{name}}\&quot; WITH LOGIN PASSWORD &#39;{{password}}&#39; VALID UNTIL &#39;{{expiration}}&#39;; \<br>        GRANT SELECT ON ALL TABLES IN SCHEMA public TO \&quot;{{name}}\&quot;;&quot; \<br>    default_ttl=&quot;1h&quot; \<br>    max_ttl=&quot;24h&quot;</pre><p>In the above example, we use a readonly role. Multiple roles can be setup per database for generating different levels of credentials. Now you just need to read the credentials from your desired role and Vault will generate these in the database.</p><pre>$ vault read database/creds/readonly<br>Key             Value<br>---             -----<br>lease_id        database/creds/readonly/4287c6b5-19c5-94e5-773c-f85d05989be3<br>lease_duration  60m0s<br>lease_renewable true<br>password        f1m3a90b-f5e8-0263-f008-a96f373d84232<br>username        412dde25-cdde-8184-87f1-854da621395c</pre><p>In this example, the credentials have a 60 minute TTL and Vault will handle the revocation of these credentials from the database once they expire. All of the commands above can also be done using Vault’s API</p><p>You can see the full Vault database docs at <a href="https://www.vaultproject.io/docs/secrets/databases/index.html">https://www.vaultproject.io/docs/secrets/databases/index.html</a></p><h3>AWS IAM Example</h3><p>Vault can also provide dynamic AWS credentials. When you make a credential request to Vault, you will get back a new set of access/secret keys each time. Run through the following steps to accomplish this:</p><ol><li>Mount the AWS backend to Vault</li><li>Configure the root account in Vault</li><li>Assign an AWS policy to a Vault role that the dynamic credentials use</li></ol><pre>$ vault mount aws</pre><pre>Successfully mounted &#39;aws&#39; at &#39;aws&#39;!</pre><pre># If this step is skipped, it will use standard AWS credential chain or instance profile if running Vault on EC2<br>$ vault write aws/config/root \<br>    access_key=$ROOT_ACCESS_KEY \<br>    secret_key=$ROOT_SECRET_KEY \<br>    region=us-east-1</pre><pre>$ vault write aws/roles/specialrole arn=arn:aws:iam::aws:policy/SuperSpecialCustomPolicy</pre><p>Now that the AWS backend is setup, every time you read the credentials from Vault, you will get back unique credentials that are tied to the arn:aws:iam::aws:policy/SuperSpecialCustomPolicy policy and configured AWS account.</p><pre>$ vault read aws/creds/specialrole<br>Key             Value<br>lease_id        aws/creds/specialrole/7cb8df71-782f-3de1-79dd-251778e49f58<br>lease_duration  3600<br>access_key      AKIAIOMYUTSLGJYQIDFGF<br>secret_key      BK9++oBABaBvRKcT5KEF69xQGcH7ZpPRF3qovRt<br>security_token  &lt;nil&gt;</pre><p>By default, this credential set only exists for 3600 seconds (although this is configurable). If you execute the same vault read aws/creds/specialrole command again you will get back entirely new credentials. All of the commands above can also be done using Vault’s API</p><p>You can see the full docs on dynamic AWS secrets in Vault at <a href="https://www.vaultproject.io/docs/secrets/aws/index.html">https://www.vaultproject.io/docs/secrets/aws/index.html</a></p><h3>Conclusion</h3><p>Dynamic secrets are a neat feature of Vault and can be useful to any organization with a lot of secrets to manage. It can also do other cool things like “cryptography as a service” and easier storage of static passwords. At Gogo we even use Vault to store binary blobs like p12 certs and client certificates. Vault also has a robust API and client libraries for almost any language so that it is easy to get started and integrate with existing applications.</p><p>Vault Docs: <a href="https://www.vaultproject.io/">https://www.vaultproject.io/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf6f29fefc8f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gogoair-tech/super-secret-dynamic-secrets-with-vault-cf6f29fefc8f">Super Secret Dynamic Secrets with Vault</a> was originally published in <a href="https://medium.com/gogoair-tech">Gogo Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Immutable Jenkins]]></title>
            <link>https://medium.com/gogoair-tech/immutable-jenkins-ae54e4a37a6a?source=rss----5bf066195983---4</link>
            <guid isPermaLink="false">https://medium.com/p/ae54e4a37a6a</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[immutable-infrastructure]]></category>
            <dc:creator><![CDATA[Bekzot Asimov]]></dc:creator>
            <pubDate>Mon, 22 May 2017 16:42:44 GMT</pubDate>
            <atom:updated>2017-05-22T16:42:43.789Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*sglpqRDlMGjnsX5QjzLtnQ.png" /><figcaption>Jenkins official logo downloaded from Jenkins wiki.</figcaption></figure><h4>Fun fact: Jenkins can deploy itself</h4><p>This is just a quick reference to how Jenkins CI can be pipelined and deployed continuously without any downtime.</p><h4>Jenkins at Gogo</h4><p>We are doing fantastic things at <a href="http://www.gogoair.com/">Gogo</a>, one of them being immutable infrastructure. We accomplish this by leveraging <a href="https://jenkins.io/">Jenkins CI</a>, <a href="https://github.com/spinnaker/spinnaker">Spinnaker</a>, <a href="https://about.gitlab.com/">Gitlab</a>, <a href="https://www.terraform.io/">Terraform</a>, <a href="https://www.ansible.com/">Ansible</a> and more. We have made a lot of tooling in order to eliminate manual processes and allow developers to commit code and continuously deploy their applications.</p><p>When we started, all of our base infrastructure was deployed using Terraform. The biggest challenge with this is that updates require a lot of manual intervention, and so we found that we neglected to perform upgrades in a timely manner. This was fine for a while, but the ultimate goal was to use the pipeline for all of the services that we provide to developers.</p><p>Jenkins was one of the last tools that we pipelined and brought into our immutable environment. Jenkins is an instrumental part of our build pipeline, but by its very nature, it’s a tough cookie to make immutable. By default, Jenkins runs with only one master node and cannot leverage multiple instances behind a load balancer. There’s a lock file on the master node’s home directory named .owner which stores master node information to ensure that only one node is active.</p><h3>How to install immutable Jenkins</h3><p>In an attempt to automate Jenkins deployment itself we had to use AWS’s <a href="https://aws.amazon.com/efs/">EFS</a> (NFS server from AWS) service to give us flexibility in deploying Jenkins via Spinnaker. While baking the AMI, we opted to execute an Ansible playbook, but you could make it a shell script or any other type of script that runs after installation.</p><h4>Steps to run while baking an image</h4><ul><li>Mount EFS on old Jenkins server and sync all of the files from Jenkins home directory to EFS (If you already have Jenkins installed).</li><li>Internally, we added <a href="https://github.com/gogoair/foremast"><strong>foremast</strong></a> pipeline files for Jenkins master configuration.</li><li>We then bake an image and deploy Jenkins via Spinnaker. We run the Jenkins installation script from an rpm during bake time.</li></ul><pre>#!/bin/bash</pre><pre># WARNING: Please do not uncomment below, unless you are sure this is a brand new installation.</pre><pre># For fresh Jenkins install you can uncomment below commands and give proper command for efs mount.</pre><pre># groupadd -g 495 jenkins</pre><pre># useradd -d /var/lib/jenkins -s /bin/bash -u 495 -c &quot;Jenkins Continuous Build server&quot; -g jenkins jenkins</pre><pre># mount command goes here, you will need to mount EFS to /var/lib/jenkins</pre><pre># For the first time jenkins installation, EFS is empty, so you will need to mount it before jenkins install.</pre><pre># This runs the entire Jenkins playbook.</pre><pre>echo &quot;INFO: After install: playbook is now executing.&quot;</pre><pre>cd /opt/playbooks/ <br># This playbook has all the steps taken, can be any script.<br>/usr/bin/ansible-playbook jenkinsci-pipeline.yml</pre><ul><li>Script installs Jenkins from a <a href="http://pkg.jenkins-ci.org/redhat-stable/">stable repo</a>, and then mounts the EFS volume. This is the most important step. EFS needs to be mounted only after Jenkins RPM is installed since RPM would otherwise overwrite some files.</li></ul><pre>- name: Ensure Jenkins Yum repo present<br>  yum_repository:<br>    name: jenkins<br>    description: Jenkins YUM repo<br>    baseurl: &quot;{{ jenkins_repo_url }}&quot;<br>    gpgkey: &quot;{{ jenkins_repo_key_url }}&quot;<br>    gpgcheck: yes<br>  tags:<br>  - system<br>  - jenkins<br>  - build<br><br>- name: Ensure necessary packages installed or updated<br>  dnf:<br>    name: &quot;{{ item }}&quot;<br>    state: latest<br>  with_items:<br>    - nginx<br>    - jenkins-{{ jenkins_version }}<br>    - git<br>    - nfs-utils<br>  tags:<br>  - system<br>  - jenkins<br>  - build</pre><pre># After Ansible 2.3 they changed the name to path (# Before 2.3, option &#39;name&#39; was used instead of &#39;path&#39;)<br>- name: Mount Jenkins Home /var/lib/jenkins to &quot;{{ efs_server }}&quot;<br>  mount:<br>    name: /var/lib/jenkins<br>    src: &quot;{{ efs_server }}&quot;<br>    fstype: nfs4<br>    opts: nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2<br>    state: mounted</pre><ul><li>After home is mounted, we empty the file “.owner”. By doing this we can avoid Jenkins warning as home directory in use by other node.</li></ul><pre>- name: Remove previous users contextPath stats<br>  copy:<br>    content: &quot;&quot;<br>    dest: /var/lib/jenkins/.owner<br>    owner: jenkins<br>    group: jenkins<br>    mode: 0644<br>    force: yes</pre><ul><li>We execute a deployment in red/black fashion using Spinnaker. In case anything goes wrong we can quickly roll back to a previous working ASG.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bCRmPDAsmdSW91_Lq5poZg.png" /></figure><h4>Further Resources</h4><ul><li><a href="https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins">https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae54e4a37a6a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gogoair-tech/immutable-jenkins-ae54e4a37a6a">Immutable Jenkins</a> was originally published in <a href="https://medium.com/gogoair-tech">Gogo Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins Jobs as Code with Groovy DSL]]></title>
            <link>https://medium.com/gogoair-tech/jenkins-jobs-as-code-with-groovy-dsl-c8143837593a?source=rss----5bf066195983---4</link>
            <guid isPermaLink="false">https://medium.com/p/c8143837593a</guid>
            <category><![CDATA[groovy]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Doug Campbell]]></dc:creator>
            <pubDate>Fri, 12 May 2017 16:59:36 GMT</pubDate>
            <atom:updated>2017-05-12T17:00:11.684Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EUWG_tnKbLpsfTBRkNmXnA.jpeg" /></figure><p>At Gogo, we use Jenkins very heavily for CI/CD. We leverage it for building all our deployable artifacts; it’s the critical first step in our continuous deployment pipeline.</p><p>Currently, we have over 500 Jenkins jobs. Anyone who is familiar with Jenkins knows it is very tedious to create jobs manually. That is where the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin">Job DSL plugin</a> comes in. To quote the plugin summary:</p><blockquote>The <a href="https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin">Jenkins job-dsl-plugin</a> attempts to solve this problem by allowing jobs to be defined with the absolute minimum necessary in a programmatic form, with the help of templates that are synced with the generated jobs</blockquote><p><em>i.e</em>: You can define your Jenkins jobs as code.</p><h3>Usage</h3><p><a href="https://github.com/jenkinsci/job-dsl-plugin/wiki/Tutorial---Using-the-Jenkins-Job-DSL">View full tutorial here.</a></p><p>To use the Job DSL plugin, you first need to create a <em>seed job</em>. The seed job is a Jenkins job which runs a DSL scripts, and then generates a new job. The seed job is a normal free-style Jenkins job that you add the “Process Job DSL” build step. This step takes the DSL and generates the configured jobs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*3GaSxkluFgABLisB-Bosbg.png" /><figcaption>Process Job DSLs build step</figcaption></figure><h3>The DSL</h3><p>The DSL is scriptable via Groovy and so it is extremely flexible. The DSL also provides direct control over a job’s XML; this makes it possible to automate the creation of any job, regardless of what has been implemented in the DSL. A lot of helper methods are provided which makes it very easy to setup things such as build triggers, version control, shell scripts, and more. There is also a great <a href="https://jenkinsci.github.io/job-dsl-plugin/">API Viewer</a> to help you discover the helper methods.</p><h4>Basic Example</h4><pre>def gitUrl = &#39;git://github.com/test/test&#39;<br><br>job(&#39;test-job&#39;) {<br>    scm {<br>        git(gitUrl)<br>    }<br>    triggers {<br>        scm(&#39;*/15 * * * *&#39;)<br>    }<br>    steps {<br>        maven(&#39;-e clean test&#39;)<br>    }<br>}</pre><p>If you pass the above script to the DSL seed job, it will dynamically generate a Jenkins job named “test-job”. If you submit an updated DSL, it will run the seed job and update “test-job” but not delete any history/builds.</p><h4>Complicated Example</h4><p>Below is a more detailed and complicated example in which we generate one of our <a href="https://tech.gogoair.com/foremast-automate-spinnaker-pipeline-creation-2b2aa7b2c5e4">Foremas</a>t related jobs. In this example, we do the following:</p><ol><li>Define BASE_STEPS, this is just a Groovy string that allows our shell script to be reusable across multiple jobs.</li><li>Define a new job named “foremast-pipeline-prepare”</li><li>Setup job parameters, default values, and descriptions</li><li>Setup job log rotation</li><li>Setup git repositories and link with credentials</li><li>Define what Jenkins slave labels this should run on</li><li>Add a Shell build step to run our previously defined BASE_STEPS</li></ol><pre>BASE_STEPS = &#39;&#39;&#39;#!/bin/bash<br>mkdir -p ~/.foremast<br>aws s3 sync s3://example-bucket/ . --exclude &quot;*&quot; --include &quot;foremast.cfg&quot;</pre><pre>virtualenv -p python3 venv<br>. venv/bin/activate<br>pip install -U --quiet foremast==3.10.1<br>&#39;&#39;&#39;</pre><pre>APP_STEPS = BASE_STEPS + &#39;&#39;&#39;<br>prepare-app-pipeline<br>&#39;&#39;&#39;</pre><pre>job(&quot;foremast-pipeline-prepare&quot;) {<br>  parameters {<br>    stringParam(&#39;APP&#39;, &#39;&#39;, &#39;Application name&#39;)<br>    stringParam(&#39;EMAIL&#39;, &#39;<a href="/service/mailto:psdevopstooling@gogoair.com">a</a>dmin@example.com&#39;, &#39;Associated email&#39;)<br>    stringParam(&#39;PROJECT&#39;, &#39;None&#39;, &#39;Git project associated with application&#39;)<br>    stringParam(&#39;GIT_REPO&#39;, &#39;None&#39;, &#39;The repository name to associate with application&#39;)<br>  }</pre><pre>configure { project -&gt;<br>    project / &#39;authToken&#39;(&#39;xxxxxxxxxxxxyyyyyyyyyydddddddddddyyyyyyyzzzzzzz&#39;)<br>  }</pre><pre>logRotator {<br>    numToKeep(50)<br>    artifactNumToKeep(50)<br>  }</pre><pre>multiscm {<br>    git {<br>      remote {<br>        url(https://medium.com/&quot;%3Ca%20href=%22/service/mailto:git@git.gogoair.com%22%3Egit@g%3C/a%3Eit.example.com:spinnaker/foremast-templates.git&quot;)<br>        credentials(&#39;gitlab-jenkinsci&#39;)<br>      }<br>      extensions {<br>        relativeTargetDirectory(&#39;foremast-templates&#39;)<br>        }<br>      branch(&#39;*/master&#39;)<br>    }<br>  }</pre><pre>label(&#39;script&#39;)</pre><pre>steps {<br>    shell(APP_STEPS)<br>  }</pre><pre>wrappers {<br>    colorizeOutput()<br>  }</pre><pre>}</pre><p>Now our entire Jenkins job is defined as code. This makes it automated, easily versioned, reproducible, and allows for jobs to be more standardized.</p><h3>Our Workflow</h3><p>At Gogo, we have a simple workflow that allows our developers to control their own Jenkins jobs and ties the DSL directly to their application repository.</p><ol><li>Developers create a runway/dsl.groovy file in their repository</li><li>Developers modify their dsl.groovy and customize it for their specific needs</li><li>Developers push their changes and a pre-receive git hook determines that the dsl.groovy file was changed</li><li>If the dsl.groovy file was modified, the pre-receive git hook passes it to the Jenkins DSL seed job (<a href="https://github.com/jenkinsci/job-dsl-plugin/wiki/Tutorial---Using-the-Jenkins-Job-DSL">see tutorial</a>) and regenerates the applications job</li><li>The git hook monitors the status of the DSL seed job and reports back to the developer if the job fails or succeeds and rejects the push if the DSL is not properly generated</li></ol><p>This workflow is great for us as it allows our developers full control over their Jenkins job and gives them quick feedback if there are any issues.</p><h4>Standardizing the DSL</h4><p>This workflow can cause some issues though. What if you need to change the URL of where the artifacts should be stored for the whole organization? Would you need to coordinate the update of 100+ DSL configurations in all the repositories? To solve this, we made a bunch of internal helper functions. Since the DSL is ultimately just groovy, you can do anything that the language is capable of, such as importing a model. Below is an example of how this can work.</p><ol><li>First you create a DSL utilities class. In this example, we have a function addNVM() that will add in the nvmWrapper DSL settings.</li></ol><pre>package DslUtilties</pre><pre>class Utilities {<br>    def addNVM(def nvmversion=&#39;v6.1.0&#39;){<br>        this.job.with {<br>            configure { project -&gt;<br>                project / buildWrappers &lt;&lt;      &#39;org.jenkinsci.plugins.nvm.NvmWrapper&#39; {<br>                version(nvmversion)<br>                }<br>            }<br>        }<br>        return this<br>    }<br>}</pre><p>2. Then, in your dsl.groovy script, where the job is actually defined, you can import the utilities and add the helper function</p><pre>import DslUtilities.Utilities</pre><pre>def myJob = job(&quot;test-job&quot;) {<br>    // job parameters and options...<br>} </pre><pre>utils = new Utilities(job: myJob)<br>utils.addNVM()</pre><p>This will take your defined job and add in the standardized NVM helper utility. This is useful for providing a centralized spot for DSL configurations while still allowing the individual apps to customize for specific needs</p><h3>Further Resources</h3><p>This is just a very quick overview of how the DSL plugin for Jenkins can work. For more information, you can check out the following resources</p><ul><li><a href="https://marcesher.com/2016/06/09/jenkins-as-code-job-dsl/">https://marcesher.com/2016/06/09/jenkins-as-code-job-dsl/</a></li><li><a href="https://github.com/jenkinsci/job-dsl-plugin">https://github.com/jenkinsci/job-dsl-plugin</a></li><li><a href="https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin">https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin</a></li><li><a href="https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-DSL-Commands">https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-DSL-Commands</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8143837593a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gogoair-tech/jenkins-jobs-as-code-with-groovy-dsl-c8143837593a">Jenkins Jobs as Code with Groovy DSL</a> was originally published in <a href="https://medium.com/gogoair-tech">Gogo Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Five Phases of DevOps: Incorporating DevOps in your Organization]]></title>
            <link>https://medium.com/gogoair-tech/the-five-phases-of-devops-incorporating-devops-in-your-organization-8da2039d36c7?source=rss----5bf066195983---4</link>
            <guid isPermaLink="false">https://medium.com/p/8da2039d36c7</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Joel Vasallo]]></dc:creator>
            <pubDate>Tue, 03 Jan 2017 20:33:30 GMT</pubDate>
            <atom:updated>2017-01-03T20:33:29.935Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0zN5zdluDx3pgd4CxEtoRg.jpeg" /><figcaption>Deploy like an Assembly Line —source: <a href="https://www.flickr.com/photos/woodysaeroimages/29805496681">https://www.flickr.com/photos/woodysaeroimages/29805496681</a></figcaption></figure><p>A few months back I spoke at both <a href="https://www.devopsdays.org/events/2016-chicago/welcome/">DevOps Days Chicago</a> and <a href="http://www.windycity.io/">Windy City DevCon</a> to talk about something we like to call the Five Phases of DevOps. The talk is a walk through the journey as to how we incorporated DevOps at <a href="https://www.gogoair.com/">Gogo</a>. I have been with the company for a number of years now so it is great to share the tremendous amount of progress and change that has occurred in roughly a year.</p><h3>August 2015</h3><p>In August 2015, we were tasked with creating a build pipeline to migrate services from our legacy data center to Amazon.</p><p>A brief background on where we stood at this time:</p><ul><li>Our deployments took weeks to get out the door. Quite literally there were meetings to talk about planning meetings to schedule deployments.</li><li>Our application stack was far from a micro services architecture and extremely tightly coupled.</li><li>Our “automation” was generally half baked, inconsistent, and very manual. For example, we used configuration management tools such as Chef/Puppet/Ansible to maintain configuration state, but we still needed to login to each system and manually perform restarts.</li></ul><p>As we grew as a company, more and more features and services were developed. These services grew at an exponential rate; much faster than our operational staff. We knew things had to change, and we couldn’t scale at the rate we were growing….enter in the concept of DevOps.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FsFp6EP7E2hI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DsFp6EP7E2hI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FsFp6EP7E2hI%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b8ff5f669e33a883ec386d6ed21ab94/href">https://medium.com/media/1b8ff5f669e33a883ec386d6ed21ab94/href</a></iframe><h3>Breaking Down “The Five Phases of DevOps”</h3><h4>Phase 1: Denial</h4><blockquote>“This is fine”</blockquote><p>The initial phase of making changes is often meet with denial. During this phase, some in an organization may deny that there are problems in the way things are done…or worse they know something is wrong but refuse to acknowledge it due to fear of change. Often the most common solution is just to hire more engineers; which usually cause more problems. If you find an application support team scaling up at the same rate as the application there could be fundamental problems. This model is not sustainable in the long term.</p><p>You’ll often see attempts to establish an “automation culture” in this phase. Instead of solving the problem at its source many organizations attempt to automate around it. Teams should ask, “Are we automating to fix a problem, or persist one?” While a DevOps team should certainly focus on automation, we believe that incorporating “true” DevOps encompasses a much bigger goal. Teams should take responsibility to bust down silos in an organization, empower other teams, and use automation to encourage others to do the same!</p><p>Busting silos is arguably one of the hardest things to do in any organization. Many companies attempt to solve this issue from the top down through common practices such as re-orgs or goal alignments; typical cookie cutter ways of attempting to fix communication issues. We argue that a grassroots initiative will be far more successful. To understand why, let’s take an example scenario.</p><p>Traditionally speaking, companies commonly segmented their developers in one column, quality assurance in another, and finally your operations team in another column. These columns where well defined and employees knew where their responsibilities start and where they end. Sounds great right? Of course it does; until you need to start working together. So engineers write their first application, it passes QA, then an operations team deploys it and monitors it. Everyone had a say and had a stake in the release of this application. Let’s progress to the second application written by developers, which by the way started development while QA was testing the first application, a bug comes up while testing the second application but the developers already have moved onto the third application. While all this is going on, operations teams are troubleshooting a memory leak in production from the first application that no one can remember because all development efforts are now on the third application while QA is still trying to test the second application. Now bear in mind, this example is rather trivial and linear which only makes the scenario appear to be “manageable”; scale this up to three applications going live at the same time with hard dependencies on one another. On top of keeping the lights on, you now have to manage tightly coupled software not only in production but also in planning to release to production.</p><p>We ask…why? With development teams in a silo, code is a piece of treasure and protected. No one knows how it really runs and if you think you are getting a fix in, good luck. QA is often times tasked with testing code with either vague or incorrect requirements. Since they can’t communicate effectively with development teams, they either remain blocked in progress or worse sign off on half tested software. Operations teams are then handed this nebulous piece of code that somehow made it to their queue. There often times are no requirements or plan of implementation; the best solution is just to duck and cover. If there are issues, restart the application server or do late night rollbacks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*o5N-AJBzUp-fa7TOVaTnEA.gif" /></figure><h4>Phase 2: Fear/Doubt</h4><blockquote>“That’s how things have always been done”</blockquote><p>The ball is rolling now, there is no more denying you are going to make changes, but now what can you change without taking down your entire company? You are going to be proposing changes to fundamental business process and services that probably predate your time at your organization. Some of these processes have been there since day one! Naturally, you are going to encounter resistance because “that’s how things have always been done.” There will be fear around you mucking up a process or making it worse than it already is. Finally, DevOps may cause the fear of the unknown; what happens to my job after this? Let me state this plain and clear, if the reason you are moving to DevOps is to lay off workers…you are doing it wrong. DevOps is meant to increase collaboration amongst teams and reduce the amount of tedious and redundant work loads those teams may be succumb to on a day to day basis. The goal is enable workers to focus on harder problems and work on improving; not sustaining and updating.</p><p>While getting started, it is important to lay out your deployment pipeline early and work on that from day one (even though you may not have customers yet). We found it helpful to create a sample application and deploy it through the pipeline to help test new features and functionality. While working on your pipeline, the team may begin to question and doubt themselves. Are we doing this right? Is this going to 100% solve all our issues? Are we sure this will always work? The answer: No it is not perfect nor will it ever be perfect. Accept this and move on, just make sure you can improve on your workflow as new challenges and features arrive!</p><p>When getting started, start small and set standards. Don’t try to bring on more than one or two applications early on. Realize these applications will be your test bed of things to come. These developers using your pipeline should know that what they are using is experimental and will get better over time. Pick applications that aren’t business critical or don’t have tight timelines. With that being said, make hard choices such as accepted languages in your pipeline and which operating systems you want to support. Don’t compromise on your standards early on; only add support for new things where and when it makes sense. Again, you can always add support for other languages and OSes later on, but start small and grow from there.</p><p>Finally, make sure that deployments are the fastest part of your pipeline. You want to give operations and development teams compelling reasons to shift over. Your tooling and pipeline need to be easier to use, equally performant in deployments, more available and reliable, and support fast rollbacks in the event of an issue. A great way to get started with this is leveraging the concepts of an immutable infrastructure. Treat your servers like cattle not cats.</p><p>A great way we did this was by restricting SSH access to servers. This made development teams focus on metrics, alarms, and log aggregation. Gone are the days of logging into servers. If they are in autoscaling groups they will be terminated in minutes anyways. A great tool we use internally to handle our deployments is <a href="http://www.spinnaker.io/">Netflix Spinnaker</a>. Using Spinnaker we bake our images once and deploy that same image to every environment. We have published a few articles around this as well. We also open sourced a project, <a href="https://github.com/gogoair/foremast">Foremast</a>, which you are welcomed to check out! Doug Campbell, another DevOps Engineer @ Gogo, wrote a <a href="https://tech.gogoair.com/foremast-automate-spinnaker-pipeline-creation-2b2aa7b2c5e4#.a9r37rr70">nice article on the tech blog</a> describing the tool in depth; the problem we had, the solution, and an overview of Foremast!</p><h4>Phase 3: Compromise</h4><blockquote>“Don’t let perfect be the enemy of good”</blockquote><p>Alright, it looks like this whole DevOps thing is here after all…how do we make this work in our organization? You’ll start by probably reviewing the processes established as normal; asking why do they exist? Will these steps improve the company’s velocity or slow it down?</p><p>During this phase, you will be explaining the philosophy of DevOps a lot…we mean a lot. In order for a DevOps culture to be formed, you need to have buy in from not only your technical staff but also non-technical staff as well. If you are doing it right, the benefits should be seen throughout an organization not just on a specific team or project. For example, during this time we invested heavily in bring up our Quality Engineering and Metrics teams into the fold.</p><p>We started by incorporating QE tests after each deployment phase. In doing this, we provided fast feedback for our development teams to know when something is going wrong and enable them to rollback fast. Also, we used this opportunity to flatten ourselves as an organization. No longer were our development teams and QE teams in silos. We now encourage QE and Development to work in the same workspace; both writing code, both writing tests, both communicating acceptable failures.</p><p>In addition to empowering Quality Engineering, we took a hard look at our metrics and monitoring platforms. We wanted to empower our developers to control their own destiny, but realized they also need a solid metric infrastructure to see how their applications perform in production. With this, we brought Metrics and Monitoring into the DevOps teams. We worked together to build a service catalog for development teams (thus eliminating a significant problem of tool bloat) and also empowered them to work with development teams on thresholds for alerts/quotas. As developers are now on call, it is important to have OS, application, and service level metrics ready on hand. Some tools we use are Netflix Hystrix, Graphite/Grafana, and SumoLogic/ElasticSearch.</p><p>Finally, you’ll tear apart what you have and see what can be reused. You already have metrics? Can they be expanded upon? Can processes be removed to improve support and visibility? These are all some examples of questions you may encounter during this phase. Hopefully, by this phase you have a mature understanding of the fabled words known as “technical debt.” Early on you will be tempted to make everything perfect. Don’t let perfect be the enemy of good. Make sure you enable ways to quickly iterate on solutions. Many problems today can be solved with some great open source tools. Instead of reinventing the wheel, consider using solutions out there already and contribute back. Finally, never force a tool to do something it was never built to do.</p><h4>Phase 4: Acceptance</h4><blockquote>“Better communication and reduced stress across teams”</blockquote><p>During this phase folks you on-boarded in phases 1 and 2 will start seeing benefits of change. Their workflows should now be getting simple enough that you no longer hear talks of coordinating deployments. You will be supporting many new customers, but it should all be cookie cutter. Developers can now create and support their own applications in the pipeline. They have fast feedback from metrics and quality tests. With this relief, you can now better focus on your edge case applications that require custom tooling.</p><p>A nice change of pace is you will also see better communication and reduced stress across teams as well. You will hear worthwhile conversations around redundancy, improving code quality, adding additional metrics and more. During this phase, we began talks about our multi-region cloud architecture. Development teams began work on circuit breakers with default callbacks for applications if they fall to an impacted state. At the end of the day, we finally started doing what we have always wanted to do from the beginning; improve our customers experience using our service.</p><h4>Phase 5: Relief…and Repeat</h4><blockquote>“ mission accomplished right? Wrong!”</blockquote><p>So that is it right? You have implemented “the DevOps” and deployment are much easier. No longer are you using your favorite terminal client to bring up 24 concurrent terminal shells to perform a cluster reboot manually (totally never did that). Things are in a stable state, mission accomplished right? Wrong!</p><p>If everything was incorporated right, you will probably have a large backlog of enhancements. Since everyone isn’t focused on deployments anymore, teams are now free to focus on bigger and better things. This should span past just the DevOps team. Developers are now free to implement robust solutions for their applications because releasing code is a breeze. Quality Engineers can now write better and better tests since they are working with the actual software being written. So that’s it, right? You are deploying rapidly to production in a repeatable, reliable, and consistent way. You may feel your DevOps journey is done; put your feet up and relax. What about SDNs? AWS vs Google Cloud? Containers? RPCs? What about further optimizing and speeding up your deployments? To that I say…this is fine, the cycle never ends.</p><p><a href="http://joelvasallo.com/"><em>Joel Vasallo, DevOps Engineer @ Gogo</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8da2039d36c7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gogoair-tech/the-five-phases-of-devops-incorporating-devops-in-your-organization-8da2039d36c7">The Five Phases of DevOps: Incorporating DevOps in your Organization</a> was originally published in <a href="https://medium.com/gogoair-tech">Gogo Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Companies in the Cloud get Hacked]]></title>
            <link>https://medium.com/gogoair-tech/why-companies-in-the-cloud-get-hacked-22c99a80d285?source=rss----5bf066195983---4</link>
            <guid isPermaLink="false">https://medium.com/p/22c99a80d285</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Scott Teipe]]></dc:creator>
            <pubDate>Wed, 21 Dec 2016 16:18:07 GMT</pubDate>
            <atom:updated>2016-12-20T22:20:55.529Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_7xZbgNbdtp8rMJjt1QicA.jpeg" /></figure><p>When is the last time a major data breach occurred because a hacker physically penetrated a data center? The real world isn’t like <em>Mission Impossible</em> — big data breaches don’t happen because someone rappels through a laser grid to hack a mainframe.</p><p>Instead, this is what the real world is like: the <a href="http://www.verizonenterprise.com/verizon-insights-lab/dbir/2016/">Verizon Data Breach Investigation Report (DBIR) for 2016</a> reveals that web application attacks are the most likely vector for a data breach attack. Hackers are infiltrating organizations through the path of least resistance: many organizations are lax about application security because companies like to believe the Cloud throws a big warm security blanket over everything it touches. That’s not how it works.</p><p><strong>Limitations of Data Security and the Cloud</strong></p><p>The big Cloud hosting companies, including AWS and Azure are responsible for the safety of their physical infrastructure. The cloud hosting providers dedicate tremendous resources to ensure a high level of security of their infrastructure which lulls many organizations into thinking everything, including the customer’s application data, is fully secured.</p><p>Take Quest Diagnostics for example, they suffered a <a href="http://fortune.com/2016/12/13/quest-diagnostics-data-breach-health/">hack in late November</a> that exposed personal information of 34,000+ patients. The hacker accessed the MyQuest application through the Care360 web application and obtained names, dates of birth, lab results and some patient phone numbers. Quest hasn’t specified the exact vulnerability which was exploited, and it’s currently unknown what the hacker has done with the data.</p><p>This incident coincides with the numbers reported by Verizon: while attacks on web applications account for only 8% of reported incidents, they are responsible for over 40% of incidents that result in a data breach. This is a clear indication of a security double-whammy: not only are web applications exposed, they are disproportionately vulnerable in comparison to alternative vectors. That level of success will certainly result in an exponential number of attacks against web applications moving forward.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sqbJOiDJ_nrY0rNtxIMOeg.jpeg" /></figure><p>Understanding that web applications are most often the weak link in any organization’s security profile, here are some measures you can take to reduce your overall exposure and possibly limit the damage resulting from a successful cyber-attack:</p><p><strong>Multi-factor authentication.</strong> Implementing a multi-factor authentication solution is a very successful means of preventing unauthorized access to web applications, especially against the most common forms of attack that exploit poor training or staff negligence.</p><p><strong>Implement a Web Application Firewall (WAF).</strong> A WAF can frustrate several common modes of attack, including SQL injection, cross-site scripting, and other attacks that leverage input validation vulnerabilities.</p><p><strong>Protect your CMS.</strong> Joomla, WordPress, Drupal and other content management and publishing software platforms are routinely probed and exploited by bad actors. “Virtual patching” is an effective form of automatic, zero-day protection that limits exploits based on CMS software vulnerabilities.</p><p><strong>Eliminate known threats.</strong> Utilize a web application security solution that includes a built-in IP reputation database which helps eliminate known, frequent bad actors including worldwide criminal networks who are persistent in the volume of their attacks.</p><p><strong>Continuously Assess the Applications. </strong>Performing vulnerability assessments and penetration tests against web applications is critical in defining what risks currently reside in your organization. Since new vulnerabilities are announced every day, a continuous process of test -&gt; remediate -&gt; re-test should be a core component to every security program.</p><p><strong>Create a layered and integrated security profile.</strong> Web application security should be fully integrated with other solutions designed to safeguard your online presence. This includes protection against DDoS attacks, content encryption with SSL/TLS and protection for your DNS. Everything should work together as part of an overall seamless security strategy.</p><p>Understand that shifting your data to the Cloud is not a cure-all for data security. If your organization significantly relies on web applications, you still bear the primary responsibility for ensuring a layered and effective defense against online attacks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22c99a80d285" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gogoair-tech/why-companies-in-the-cloud-get-hacked-22c99a80d285">Why Companies in the Cloud get Hacked</a> was originally published in <a href="https://medium.com/gogoair-tech">Gogo Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Amazing teams, and how to build them]]></title>
            <link>https://medium.com/gogoair-tech/amazing-teams-and-how-to-build-them-7ecdb888a0f0?source=rss----5bf066195983---4</link>
            <guid isPermaLink="false">https://medium.com/p/7ecdb888a0f0</guid>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[team]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[team-building]]></category>
            <dc:creator><![CDATA[Vida Popovic]]></dc:creator>
            <pubDate>Mon, 28 Nov 2016 17:46:54 GMT</pubDate>
            <atom:updated>2016-11-28T18:08:59.427Z</atom:updated>
            <content:encoded><![CDATA[<p>One would expect that with Henrik Kniberg, Jurgen Apello, Brian Marcin, and other big names around, it’s <strong>quite impossible for someone to stand out as a star speaker </strong>at this year <a href="http://2016.agilebyexample.com/"><strong>Agile By Example</strong></a><strong>,</strong> held in Warsaw few weeks ago. However, there were few surprises such as <a href="http://2016.agilebyexample.com/speakers/petter-abrahamsen/"><strong>Petter Abrahamsen</strong></a>.</p><p>He is a former military officer with nearly three decades of experience in building teams for very specific needs, that must be able to operate as one in quite unusual environments. He definitely <strong>added some spice to this year ABE</strong>.</p><h3>What is agility?</h3><p>Bringing up the picture similar to the one below, he asked: “Is this agility?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*46A-rgWaxQK2vf_z." /><figcaption>“Is this agility?”</figcaption></figure><blockquote>“If the beam was moving, then maybe yes. Otherwise, no.”</blockquote><p>And then, he brought up another picture and said:</p><blockquote>“Agility is much more like this”.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*sPHNaCqYhkiEoow1." /><figcaption>“Agility is much more like this”</figcaption></figure><p>This is an an excellent parallel that shows something each and every of us has faced in every-day work:</p><p><strong>While certain situations can be handled with our eyes closed </strong>(call it a result of a discipline, repetition, training, or simply accumulated experience), <strong>true agility is our ability to respond to the change happening around us</strong> <strong>(in our every-day workplace battlefields), by using our skills, techniques, and occasional strikes of inspiration to thrive</strong>. Or in some cases… to survive and get back on top of the game again!</p><p>We all face extreme situations, changing priorities, urgent issues, plans and deadlines we agreed to follow, but all this is a big game, where even rules occasionally change, <strong>BUT the team, team skills, and good cooperation</strong>, can lead to triumph.</p><p><strong>If you never before thought of comparing your team to the Navy SEALs , remember their moto: “Improvise, adapt, overcome” and reconsider the idea. </strong>In a nutshell, we all play the <strong>game </strong>of survival, while trying to achieve our missions (some in “a bit” more extreme circumstances than the others ;), but you get the point).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U8lXdTqb78cNEbqD." /><figcaption>Good teams</figcaption></figure><p>For those of you who find this interesting, I’ll list few things he shared during his talk, and let you dig in and explore on your own. I am sure you’ll find some very intriguing material!</p><ul><li><a href="https://en.wikipedia.org/wiki/OODA_loop">OODA loop</a> (observe, orient, decide, and act)</li><li><a href="https://en.wikipedia.org/wiki/Rules_of_engagement">ROE</a> (rules of engagement)</li><li><a href="https://en.wikipedia.org/wiki/Johari_window">JOHARI window</a></li><li><a href="https://en.wikipedia.org/wiki/Fundamental_interpersonal_relations_orientation">FIRO model</a></li><li>Team performance prediction — Frode Mjelde</li><li>“<a href="https://www.amazon.com/Thinking-Fast-Slow-Daniel-Kahneman/dp/0374533555">Thinking, fast and slow</a>” — Kahnemann</li><li>“Best foot theory” — Nils Arne Eggen</li></ul><p>Let me end this post with Jeff Bezos quote that <strong>“no team should be larger than 2 pizzas can feed”. Big enough to hold enough complementary skills, and small enough to keep communication effective</strong>. I’ll add that sharing those two pizzas from time to time, can bring us closer and make us enjoy the game more!</p><p><strong>Good luck with building your teams! And keep in mind that we are all responsible, no matter what our role may be!</strong></p><p>Cheers!</p><p>P.S. Petter Abrahamsen’s talk, as well as other talks from ABE16, are now available at <a href="https://www.youtube.com/watch?v=ocGh8APFvrA&amp;index=6&amp;list=PLwoIK953bBnPa3zBvQase41AOsRzGoVDU">https://www.youtube.com/watch?v=ocGh8APFvrA&amp;index=6&amp;list=PLwoIK953bBnPa3zBvQase41AOsRzGoVDU</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ecdb888a0f0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gogoair-tech/amazing-teams-and-how-to-build-them-7ecdb888a0f0">Amazing teams, and how to build them</a> was originally published in <a href="https://medium.com/gogoair-tech">Gogo Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What we learned from the Dyn DDoS attack]]></title>
            <link>https://medium.com/gogoair-tech/what-we-learned-from-the-dyn-ddos-attack-8fd4c4ac5b9d?source=rss----5bf066195983---4</link>
            <guid isPermaLink="false">https://medium.com/p/8fd4c4ac5b9d</guid>
            <category><![CDATA[it]]></category>
            <category><![CDATA[ddos]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[dns]]></category>
            <dc:creator><![CDATA[Rick Pollak]]></dc:creator>
            <pubDate>Sat, 22 Oct 2016 17:12:28 GMT</pubDate>
            <atom:updated>2016-10-24T16:23:41.333Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*7M3BKbaWxn8PLoxt21B_JA.jpeg" /></figure><p>Yesterday’s <a href="https://www.dynstatus.com/incidents/nlr4yrr162t8">attack on Dyn</a> was a great lesson for us on our own resiliency with the cloud. Two key areas for Gogo were impacted:</p><ol><li>End-user VPN was impacted because we leverage an Identity as a Service for our multi-factor authentication. Our users experienced about an hour of outage while waiting for our IDaaS to move their DNS records.</li><li>The Paypal API was unreachable for our prod systems. We quickly created a host file on our servers until DNS services were restored. Our immutable infrastructure allows us to destroy the servers and have them rebuilt without manual reverts enabling our support to “revert” at their convenience.</li></ol><p>Our mission is to move fully into the cloud, so it’s important that we examine all scenarios for connectivity, availability, resiliency, and communication. <a href="https://slack.com/">Slack</a> was a great way for our teams to communicate in real-time whilst avoiding asynchronous email trails. While we had a phone bridge for the immediate triage team, our prod support Slack channel was helpful for others to chat and get updates by reading the chronological history.</p><p>We are working on alternative, secure methods for MFA on our VPN in the event of failure. Luckily, the outage yesterday was short-lived but could have had a major impact if the duration was longer. While these type of events are unfortunate, it’s a great opportunity for us to learn. How about you?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fd4c4ac5b9d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gogoair-tech/what-we-learned-from-the-dyn-ddos-attack-8fd4c4ac5b9d">What we learned from the Dyn DDoS attack</a> was originally published in <a href="https://medium.com/gogoair-tech">Gogo Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Foremast — Lambda Pipelines]]></title>
            <link>https://medium.com/gogoair-tech/foremast-lambda-pipelines-8d49b1126ef7?source=rss----5bf066195983---4</link>
            <guid isPermaLink="false">https://medium.com/p/8d49b1126ef7</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[pipeline]]></category>
            <dc:creator><![CDATA[Doug Campbell]]></dc:creator>
            <pubDate>Tue, 04 Oct 2016 17:50:11 GMT</pubDate>
            <atom:updated>2016-10-04T17:51:26.707Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*k6KoP-bsw86ru1q_7r2h8w.png" /></figure><p>This post is part of our series on Foremast, an open source tool that we released for dynamically generating Spinnaker pipelines and infrastructure. If you haven’t already, take a look at our first post for an intro to Foremast.</p><p><a href="https://tech.gogoair.com/foremast-automate-spinnaker-pipeline-creation-2b2aa7b2c5e4">Foremast — Automate Spinnaker Pipeline Creation</a></p><p>One of the features of Foremast is that it can be used to deploy Lambda functions through a Spinnaker pipeline. Foremast takes care of setting up the function, event triggers, and roles necessary for Lambda to work. This post will go into details on how Foremast works with Lambda and how it can enable continuous delivery of Lambda functions.</p><h3>Lambda Overview</h3><p>Lambda is super cool. It is an offering from AWS that is becoming the cornerstone of <em>server-less </em>infrastructure. I like the term functions-as-a-service to describe how Lambda works. All you have to do is upload code to Lambda and everything else is taken care of. You can then setup different events that dictate when the Lambda function is triggered. It can be triggered from a schedule, changing a file in S3, updating a DynamoDB table, hitting an API endpoint, and more. Some common use-cases include:</p><ul><li>Scheduled tasks</li><li>Backend processing for API Gateway</li><li>Analyzing streams of data</li><li>AWS management tasks</li></ul><p>Take a look at the <a href="https://aws.amazon.com/lambda/">AWS docs</a> to get a better idea of Lambda features and use-cases.</p><h3>Lambda Deployment Pipeline</h3><p>This is the basic pipeline that we have defined in Spinnaker for Lambda deployments. Out of the box, Foremast will generate the below pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*pt3iZSDjblg7fFBDmABonw.png" /></figure><h4>Pipeline Steps</h4><ol><li><em>Configuration</em>: Monitor a Jenkins job for completion. This Jenkins job generates a ZIP artifact that is later uploaded to Lambda</li><li><em>Infrastructure Setup: </em>Runs Foremast with the application <a href="http://foremast.readthedocs.io/en/latest/configuration_files/index.html">configs</a>. This creates an empty Lambda function, sets up IAM roles, and attaches the configured Lambda triggers.</li><li><em>Deploy Lambda:</em> Runs a Jenkins job that uploads the ZIP artifact to the created Lambda infrastructure</li><li><em>Checkpoint:</em> This is a Spinnaker manual judgment stage. It waits for human input before deploying the Lambda function to the next environment</li></ol><p>These steps repeat for all environments defined in the application’s <a href="http://foremast.readthedocs.io/en/latest/configuration_files/pipeline_json/index.html#envs">pipeline.json</a> configuration.</p><h3>Foremast Lambda Configuration</h3><p>Foremast works the same for Lambda as it does EC2 deployments. It relies on the same configuration files but with a few specific differences.</p><h4><strong>pipeline.json</strong></h4><p><em>pipeline.json</em> for Lambda is used to define pipeline-wide settings. The Lambda runtime to use, the function handler, and if a VPC is enabled.</p><pre>{<br>  &quot;type&quot;: &quot;lambda&quot;,<br>  &quot;lambda&quot;: {<br>    &quot;app_description&quot;: &quot;Hello World in Python&quot;,<br>    &quot;runtime&quot;: &quot;python2.7&quot;,<br>    &quot;handler&quot;: &quot;main.main&quot;,<br>    &quot;vpc_enabled&quot;: true<br>  },<br>  &quot;env&quot;: [<br>    &quot;dev&quot;,<br>    &quot;stage&quot;,<br>    &quot;prod&quot;<br>  ],<br>  &quot;regions&quot;: [<br>    &quot;us-east-1&quot;<br>  ]<br>}</pre><h4>application-master-&lt;env&gt;.json</h4><p><em>application-master-&lt;env&gt;.json</em> is where the function settings are configured such as how much memory a function gets and how long the timeout is. This can be different per deployment environment.</p><p>This config is also where all Lambda events are configured. Multiple triggers can be set for one function. Take a look at <a href="http://foremast.readthedocs.io/en/latest/lambda/lambda_events.html#lambda-events">the docs</a> for all options.</p><pre>{<br>  &quot;app&quot;: {<br>    &quot;app_description&quot;: &quot;LambdaPython&quot;,<br>    &quot;memory&quot;: &quot;128&quot;,<br>    &quot;timeout&quot;: &quot;3600&quot;<br>  },</pre><pre>  &quot;lambda_triggers&quot;: [<br>    {<br>      &quot;type&quot;: &quot;cloudwatch-event&quot;,<br>      &quot;schedule&quot;: &quot;rate(5 minutes)&quot;,<br>      &quot;rule_name&quot;: &quot;LambdaPython-rule&quot;,<br>      &quot;rule_description&quot;: &quot;triggers lambda function every five minutes&quot;<br>    }<br>  ]<br>}</pre><h4>Supported Events</h4><p>At the time of writing this post, Foremast supports the following Lambda event - which are all part of the AWS eco-system.</p><ul><li>Cloudwatch</li><li>Cloudwatch Logs</li><li>S3</li><li>API Gateway</li><li>SNS</li></ul><p>There are different levels of automation around each event. For example, if you set an API Gateway event, Foremast will create the API, methods, and resources if they do not already exist.</p><p>If an event you want is not supported just file an issue on <a href="https://github.com/gogoair/foremast">Github</a> or put in a pull request!</p><h3>Uploading the Code</h3><p>Foremast does not handle uploading the code to the created Lambda function. We decided there were already better ways to do this and currently utilize the <a href="https://wiki.jenkins-ci.org/display/JENKINS/AWS+Lambda+Plugin">AWS Lambda Jenkins plugin</a>.</p><p>Once Foremast has run and created the empty Lambda function, connected the event triggers, and setup permissions, we have the Spinnaker pipeline kick off a Jenkins job. The job uploads a ZIP file to the Foremast created infrastructure.</p><h3>Spinnaker Lambda Support</h3><p>Spinnaker is adding official support of Lambda and we are very excited to see what this will look like. We will likely update Foremast when it is released in order to support automation around the Spinnaker methodology. Our developers were just so excited to start using Lambda that we got a jump start in making our own deployment pipeline.</p><h3>More Info</h3><p>If you want more info about Foremast, Lambda, Spinnaker, or friendly conversation, you can find us on Gitter: <a href="https://gitter.im/gogoair/foremast">https://gitter.im/gogoair/foremast</a></p><p><a href="https://github.com/gogoair/foremast">View the code here</a></p><p><a href="http://foremast.readthedocs.io/en/latest/">View the docs here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*-XZQI0Gzqf5eZqCnSfB4DQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d49b1126ef7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gogoair-tech/foremast-lambda-pipelines-8d49b1126ef7">Foremast — Lambda Pipelines</a> was originally published in <a href="https://medium.com/gogoair-tech">Gogo Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Foremast — Automate Spinnaker Pipeline Creation]]></title>
            <link>https://medium.com/gogoair-tech/foremast-automate-spinnaker-pipeline-creation-2b2aa7b2c5e4?source=rss----5bf066195983---4</link>
            <guid isPermaLink="false">https://medium.com/p/2b2aa7b2c5e4</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[deployment-pipelines]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Doug Campbell]]></dc:creator>
            <pubDate>Wed, 14 Sep 2016 14:46:31 GMT</pubDate>
            <atom:updated>2016-09-27T15:25:30.562Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hseoANKTMiRk-lg2_XheGw.jpeg" /><figcaption>Set sail for easy deployments</figcaption></figure><p><a href="http://www.spinnaker.io/">Spinnaker</a> is an awesome tool from Netflix. If you haven’t checked it out yet, stop reading and go take a look right now at <a href="http://www.spinnaker.io/">http://www.spinnaker.io/</a> . Spinnaker has become a core part of Gogo’s deployments to AWS and we wrote a tool called Foremast to help automate pipeline and infrastructure creation within Spinnaker.</p><p>We are excited to make Foremast open source and will be writing a few blog posts to detail usage and features.</p><p><a href="https://github.com/gogoair/foremast">Get the code here</a></p><p><a href="http://foremast.readthedocs.io/en/latest/">Read the docs here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*-XZQI0Gzqf5eZqCnSfB4DQ.png" /></figure><h3>The Problem</h3><p>Foremast was created to solve some workflow issues we were having in Spinnaker:</p><ol><li>We didn’t want to create each pipeline by hand in the UI.</li><li>We did want pipelines to be versioned, have a change log, and be easily reproducible</li><li>We wanted to provide a standardized pipeline to all developers in the organization but be flexible enough to meet the specific needs of each application.</li></ol><h3>The Solution</h3><p>The solution was to make Foremast. It takes a couple of JSON configuration files and Jinja2 templates to dynamically create unique Spinnaker pipelines for each application.</p><p>Developers create some simple JSON configurations per application. These configurations provide details on the pipeline and infrastructure needs. Foremast takes those configurations, renders a bunch of Jinja2 templates, and then acts as a client for the Spinnaker Gate API. Foremast comes with generic templates for creating a simple pipeline but it can also point to external templates for custom pipelines that fit any workflow.</p><h3>The Configs</h3><p>Pipeline creation relies on a couple configuration files per application. We like to put these configs in the same repository as the application so that they are versioned the same. See the documentation at <a href="http://foremast.readthedocs.io/en/latest/">http://foremast.readthedocs.io</a> for all configuration options.</p><h4>pipeline.json</h4><p>This config is used to define pipeline-wide settings. What accounts to deploy to, what regions, where to send notifications, etc. Below is the bare minimum that the config needs.</p><pre>{<br>  &quot;env&quot;: [<br>    &quot;dev&quot;,<br>    &quot;stage&quot;,<br>    &quot;prod&quot;<br>  ],<br>  &quot;regions&quot;: [<br>    &quot;us-east-1&quot;<br>  ]<br>}</pre><h4>application-master-&lt;env&gt;.json</h4><p>This config defines environment specific settings such as security groups, instance sizing, health checks, and scaling policies. This config needs to exist for each AWS account that the application is deployed to.</p><p>This config can be completely blank and it will use sane defaults. Below is an example of what this config can include.</p><pre>{<br>  &quot;security_group&quot;: {<br>    &quot;description&quot;: &quot;something useful&quot;,<br>    &quot;elb_extras&quot;: [&quot;offices_access&quot;],<br>    &quot;egress&quot;: &quot;0.0.0.0/0&quot;<br>  },<br>  &quot;app&quot;: {<br>    &quot;instance_type&quot;: &quot;t2.small&quot;,<br>    &quot;app_description&quot;: &quot;Demo Application&quot;,<br>    &quot;instance_profile&quot;: &quot;app_profile&quot;<br>  },<br>  &quot;elb&quot;: {<br>    &quot;subnet_purpose&quot;: &quot;internal&quot;,<br>    &quot;target&quot;: &quot;TCP:8080&quot;,<br>    &quot;ports&quot;: [<br>      {&quot;loadbalancer&quot;: &quot;HTTP:80&quot;, &quot;instance&quot;: &quot;HTTP:8080&quot;}<br>    ]<br>  },<br>  &quot;asg&quot;: {<br>    &quot;subnet_purpose&quot;: &quot;internal&quot;,<br>    &quot;min_inst&quot;: 1,<br>    &quot;max_inst&quot;: 4,<br>    &quot;scaling_policy&quot;: {<br>        &quot;metric&quot;: &quot;CPUUtilization&quot;,<br>        &quot;threshold&quot;: 90,<br>        {<br>        &quot;period_minutes&quot;: 10,<br>        &quot;statistic&quot;: &quot;Average&quot;<br>        }<br>  },<br>  &quot;regions&quot;: [&quot;us-east-1&quot;],<br>  &quot;dns&quot; : {<br>    &quot;ttl&quot;: 120<br>    }<br>}</pre><h4>foremast.cfg</h4><p>foremast.cfg is the config that drives Foremast execution. This should live in <em>/etc/foremast/foremast.cfg</em> or <em>~/.foremast/foremast.cfg</em>. It holds info such as Gate URL, environments, and formatting.</p><pre>[base]<br>domain = example.com<br>envs = dev,stage,prod<br>regions = us-east-1,us-west-2<br>gate_api_url = <a href="https://gate.example.com:7777/">https://gate.example.com:</a>8084</pre><pre>[formats]<br>domain = example.com<br>iam_policy = {project}_{repo}_policy<br>iam_profile = {project}_{repo}_profile<br>jenkins_job_name = {project}_{repo}_job</pre><h3>Running Foremast</h3><p>Foremast has a few easy CLI endpoints for running tasks. These endpoints read in environment variables which makes them ideal for running in a Jenkins job. In this post we will just cover how to generate a pipeline.</p><h4>Installing</h4><p>Foremast requires Python3 and ideally runs in a virtualenv.</p><pre>virtualenv -p python3 venv<br>source venv/bin/activate<br>pip install foremast</pre><h4>Environment Variables</h4><pre>GIT_REPO = The name of the application repository<br>PROJECT = The group/project of the application<br>RUNWAY_DIR = The directory of your application-*.json and pipeline.json configs</pre><h4>foremast-pipeline</h4><p>‘<em>foremast-pipeline</em>’ is the CLI endpoint that will create a Spinnaker application and generate the pipeline. When successfully complete, you should see your application in Spinnaker</p><pre>GIT_REPO=&quot;demo&quot; PROJECT=&quot;appgroup&quot; EMAIL=&quot;developer<a href="/service/mailto:ps-devopstooling@gogoair.com">@example.com</a>&quot; RUNWAY_DIR=/path/to/configs foremast-pipeline</pre><h3>The Results</h3><p>Once Foremast has successfully ran the “<em>foremast-pipeline</em>” endpoint you should see a pipeline in Spinnaker that looks similar to below example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2t-qxXoexaZOxCTwoJQCxA.png" /><figcaption>Basic dev -&gt; stage -&gt; prod pipeline generated from Foremast</figcaption></figure><p>With Foremast this pipeline is now easily reproducible and customizable for each application needs.</p><h4>Gogo’s Workflow</h4><p>At Gogo, we have a workflow with Foremast that we feel works pretty well.</p><ol><li>Developer makes a change to any of the <em>*.json</em> Foremast configs and push the change to a central Git repository</li><li>A server-side Git hook detects a change to the files and triggers a Jenkins job with parameters based on the changed files.</li><li>The Jenkins job runs the “<em>foremast-pipeline</em>” endpoint and dynamically creates or updates the Spinnaker pipeline.</li><li>Almost immediately after pushing a change, the Developer has their updated pipeline created in Spinnaker and ready to use.</li></ol><h3>But Wait, There is More!</h3><p>Dynamically building Spinnaker pipelines is not all that Foremast does. Some other features include:</p><ul><li>Generating AWS Infrastructure based on the JSON configs</li><li>Create AWS Lambda infrastructure and pipelines in Spinnaker</li><li>Highly customizable pipelines via external Jinja2 templates</li></ul><p>We will go into more depth on those features in later blog posts.</p><p>If you are super interested, want some help, or just want to chat about Spinnaker and Foremast, we are active on <a href="https://gitter.im/gogoair/foremast">Gitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b2aa7b2c5e4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gogoair-tech/foremast-automate-spinnaker-pipeline-creation-2b2aa7b2c5e4">Foremast — Automate Spinnaker Pipeline Creation</a> was originally published in <a href="https://medium.com/gogoair-tech">Gogo Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>