Category: Blogs

  • Always-on: The New Normal

    Always-on: The New Normal

    One of the many challenges of DevOps is finding great team members that can handle the always-on nature of the job. Nearly everyone at VictorOps has been “that person” and has done the weeklong stint of carrying the virtual pager.

    What we noticed in our years of doing that job is that team member behavior tends to be polarized. If it’s your week to be on-call, then you are “all in”. You don’t venture far from home, you can’t attend special events and you have to apologize to your significant other a lot. When you are not on-call, you tend to unplug from the company. These are normal behaviors and completely understandable given the difficulty of the job.

    The problem is that this on-call way of life is not conducive to actually fixing problems faster. In a perfect, company-centric world, everyone would get paged for every problem with the logic being that one of the team members actually has the information needed to solve the problem. But that’s not going to happen. And unfortunately, the truth of the situation is that you’re not sure who that one person with the correct knowledge to solve the problem will be.

    The question then arises…how can team members have more knowledge about what is going on with the complex systems in their architectures while also maintaining their quality of life?

    Consider Twitter and Facebook user behavior. I have a cousin that lives in Chicago. I have seen her in-person once in the last 30 years, yet I know she remodeled her living room, I know about her work and I know where she took her last vacation. I know these things because the Twitter and Facebook experiences leverage something called Continuous Partial Attention, a term coined by Linda Stone in 1998. Basically, I pull my phone out of my pocket, swipe once, and gain a disproportionate amount of information for the effort (or conscience thought) I put into it.

    If you’re in DevOps, then the idea of Continuous Partial Attention is something you’re already living daily. Now imagine putting CPA to work for your team. Everyone can have an eye on the infrastructure, but not “feel like it”. The on-call team member is still responsible but if everyone has an idea of what is happening, the likelihood of someone knowing the answer is revealed sooner. Now everyone wins because the problem is solved faster, getting the team back to their lives and the company back to revenue generation.

  • Hello World

    Hello World

    The DevOps Cup o’ Joe  blog appears  a few times a week with a look around the DevOps blog world, highlighting the  authors choices for top blog posts of the period. 

    Hello World! It’s been many years since I thought it was pretty cool to have a computer print that during my own days of coding back when punch cards were all the rage.  Though the technology has changed a lot since then, the business of technology has not changed as much. The quickest way to figure out whether a practice or process in IT has become accepted and here to stay is to find out how many are writing about it…and what they are saying.

    kravitzThat’s what I am going to write about…. I am going to be the nosey neighbor in the DevOps blogs neighborhood, sort of like a Gladys Kravitz. Some of you are probably saying; who is Gladys Kravitz? If you don’t know I will tell you later.

    As I look across DevOps blogs landscape I find many simply use their blog as a support tool……not very insightful but still better than those that have no blog at all. Others use their blog as a shill for the marketing department. I will be searching the world of devops blogs for thought leaders. Though I must admit I will also shout out some blogs simply because they grab my attention. The best bloggers transcend the web pages of their blogs and give you a glimpse into their souls and the souls of the companies they work for. They are truly storytellers. Many of these bloggers are already blogging for devopsy.kinsta.cloud, but I am going to highlight others.

    Enough with the posturing and let’s get started. My favorite blog yesterday was from the PagerDuty blog. You really need to read this heartfelt story written by the bride of a PagerDuty customer, “I Married an On-Call Engineer”. The post tells a story many on this site can relate to.  This is a test to see if devops can survive marriage, or is it marriage survive devops. I will let you decide.

    Puppetlabs is seeking talking proposals for PuppetConf 2014 by March 18; http://puppetlabs.com/blog/deadline-nigh-submit-your-puppetconf-puppetcamp-talks . Puppet Labs conference in San Francisco is one of the big devops events and time is short to submit. That is my community service for this edition.

    Speaking of devops events, JumpCloud organized a DevOps State of the Union in Boston with some major analysts and writers in early March. The event is covered in a series of blog recaps and worth the read. Pay particular attention to the Three DevOps Insights.

    It’s early and there is enough great content here on devopsy.kinsta.cloud, so that is all I am going to give you today. Stay tuned as I will be recapping the best of DevOps blogs a couple of times a week here on DevOps Cup o’ Joe.

    BTW, to answer the earlier question Gladys Kravitz is the nosey neighbor of Darren and Samantha Stevens. If your next question is who are they, then you are too young to be reading this without a note from Ops.

    If you would like something mentioned here or have something you think I should Shout Out; email parker@devops.com and don’t forget to comment here.

  • Having DevOps In Your Job Title Is Doing You Harm

    matrixThis post was originally published on my personal blog in May 2013.  But I think this topic is important and wanted it to be my first contribution to devopsy.kinsta.cloud

    I used to be Director of DevOps…twice. Both times, I changed my title later. I even ran a DevOps team…although the team was already called that when I took over.

    I have fallen victim to the the abuse of the DevOps title, and I see it all the time. In the DevOps twitter hashtag, people contacting about DevOps job opportunities…it’s got to be a real thing, right?

    I mean, we totally have people that are doing DevOps these days, right?  I know that I can find all kinds of job descriptions for DevOps Engineers from many types of companies.

    But, there is one very important reason why you might want to think twice before using “DevOps” as part of your job title.

    My friends (rightfully) give me grief for the fact that I self-assigned my title at Dyn to be the Director of DevOps (I still feel bad about it). I really hate job titles in general and this is what happens when you don’t care about what your title is.

    How the story goes is that when I received the offer from Dyn, my original title was Director of System Automation and Release Engineering. Since I was pretty sure that wasn’t going to fit on a business card, I took the job and asked that we change the title later. Fast forward a month, as after talking and trying to formulate my job description & title for about 20 min, I say simply enough, ”F this. Just call it DevOps, I’ve got other things to do.” I was far too busy to really care much about an arbitrary title.

    Fast forward a few weeks to Monitorama, and I was chatting with Mike Rembetsy. After talking for two minutes about how the new job was going, he said, “Oh, that reminds me, you need to change your job title. It’s terrible.” I tried to convince him for about three more minutes, mainly trying to express to him that it doesn’t matter. He then dropped the knowledge bomb that gave me the aha moment.

    When you are the Head of DevOps, you “own” DevOps. If DevOps fails, it is your failure, when it should be a failure of the entire company to change, adapt, and accept the cultural shift.

    That is the major problem with being the “head” of DevOps, or the “Director/Manager/VP/etc. of DevOps.” If DevOps fails inside your company, it’s a really easy way for the executives to say “Well, you are the head of DevOps so obviously it failed because you failed.”

    The reality is that DevOps is a culture that should be accepted by every facet of your organization. Everyone needs to embrace the changes of a DevOps culture, and there can not be a single owner of it.

    Soon after that conversation, I relaunched my team and title in general to be the “DevTools Team” (a brilliant Etsy recommendation). The more I thought about it, it accurately describes the work that we do. We build the tools needed for Developers (and Ops/QA/NetSec) to spend more of their time writing code, and less time dealing with distractions.

    I know some people want to have a DevOps team, or want to call their team the DevOps team. Jez Humble wrote a wonderful blog post last year that I highly recommend that you read. He summarizes that there are scenarios that a “DevOps” team label works, and I do agree with what he says. But don’t just label a team DevOps, assign a new Manager of DevOps and wonder why three or six months go by and things are still bad. Things are still terrible because all you did was change a team name, or give a brand new team a name, or in some cases , just created a new silo called the “DevOps Team Silo”.

    Well, what am I supposed to call myself?

    Here are some of the examples that came up during the Open Space:

    • Site Reliability Engineer
    • Automation Engineer
    • Release Engineer
    • DevTools Engineer

    I don’t know why recently there is a need to move away from the same job titles we’ve used in the past, as if there is some negative connotation towards them. It’s not that the jobs have really changed much; it’s that we’re just getting better and more efficient at doing them with the tools at our disposal. The tools have grown so quickly, it has enabled us to be much better at our jobs, but only if you are willing to learn something new.

    • System Administrator
    • Operations Engineer
    • Network Engineer

    In the end, titles really don’t matter very much, and they shouldn’t matter much. But they can actually have a more powerful (negative) impact internally by making you the owner of a culture that should be accepted by everyone. But there is one point that I believe is so important it needs to be repeated:

    If DevOps fails, it should be a failure of the entire company.

    Check out my talk “How to Keep the People You Need,” where I discuss recruitment and retention of your hard to fill positions. Also check out the panel on DevOps with Twitter’s Rich Paret from Dyn’s Geek Summer camp.

  • Security Policies For DevOps 101

    Security Policies For DevOps 101

    A while back I was talking with some friends about how to ensure security inside a devops environment.  The simple first thought was that no where does DevOps say to do away with security.  Instead, consider how your existing information security practices and policies need to adjust given the changes that DevOps brings to the working environment.  Veteran security professionals understand that many security practices begin with policies.  Furthermore, no policy is ever set in stone. Failing to update policies and procedures at least every year is already a recipe for disaster.

    I tell a lot of people to think back when the iPhone was first introduced.  The natural tendency of security professionals inside IT organizations was to either 1) simply ignore the device or 2) establish a flat out denial kind of policy.  Neither choice was even near the right answer.  I can say first hand that I was victim to this kind of tunnel decision making.  We updated our mobile device policies with a flat out “no iPhone for you…come back in 2 years” doctrine.  My feeble attempts to fend off iOS devices lasted maybe a year.  Meanwhile, lots of people at the office were seen with iPhones in hand who continuously said things like “but I’m not using it for work”.  Flat out denial on both mine and their parts.

    Bottom line, policies are meant to be changed for the changing environments.  DevOps is no different.

    The Minimum Requirements

    Just like in development how we talk about the minimum viable product, we can apply the same concepts to implementing security practices.  For starters, make sure your organization has a few policies drawn up, agreed upon and stamped with the approval of your executive staff.  The minimum set of policies any organization needs should include: network or Internet security, computer security, information and intellectual property security policies; secure software development policies and procedures.

     Be the Champion

    But the job doesn’t stop at policy creation.  Even having your executives agree to the policies doesn’t mean they will be followed or even understood by your DevOps teams.

    I speak to security heads often and tell them they need to get out of their seats and speak to all the employees in a company.  One of the first conversations to have is to begin championing the security policies.  Make sure people understand the policies and more importantly understand the reasons for the policies which have been selected.

    Do you remember going to high school and being told you have to follow a rule that you thought was totally asinine?  Non security folks will probably think the same about silly policies and might even act out purposely against them. A champion needs to teach and live those policies.  And when someone challenges the policies, then take the time to have a two-way conversation with them.  Make sure you understand their point of view first before you try and push your silly security ideals on them.

    Taylor Your Policies

    While the policy template available online, like those available from SANS, are a great starting place, don’t just slap those on the intranet as-is.  Read them and make adjustments for your company, for your culture and your development practices.  Even better, include policies that are specific to cloud and DevOps.

    One area of customization to start with is to create policies for specific cloud vendors.  For example, consider setting policies around how to the company should be using the Amazon’s IAM feature.  Make specific policies around how IAM users and groups should be configured and used.  Use the doctrine of least privilege and design a sane access control policy.  Consider a policy where only a few trusted users have full admin access and other users are in a power users group where they can launch instances, but cannot alter AWS console configuration or access.  You might want to give your accounting team limited access to the console as well to review billing and usage.  While you are at it, develop specific policies around the use, distribution and storage of cloud API keys.  Furthermore, consider enforcing two factor authentication.  These kinds of specific use case policies will go a long way for security teams in gaining confidence with the DevOps teams.

    DevOps might be the cool new hotness that is making waves in every kind of organization, but that doesn’t mean we can forget our information security requirements in a DevOps environment.  One of the starting points in ensuring DevOps organizations follow good security practices is to start with a minimum set of security policies.  Make sure you champion these policies and tailor them to your specific organization and use case.  With a little luck and determination even your DevOps teams can follow security best practices.

  • In the DevOps Journey, Culture Comes First

    In the DevOps Journey, Culture Comes First

    Etsy, the global marketplace where people sell handmade goods, vintage items, craft supplies and more, has grown by more than 10 times since Chad Dickerson joined as CTO in 2008.

    While the organization’s success is obviously the result of numerous factors, it’s no coincidence that upon arrival, Dickerson initiated a significant culture shift in how the company’s development and operations teams deploy updates to the front- and back-end of the website.

    What kind of culture shift? If you saw my title in the byline, you probably know that I’m talking about DevOps. But before we get into why culture is so important to DevOps, let’s back up a bit and make sure we’re all on the same page about what DevOps actually means.

    At CA Technologies, we define DevOps as best-practice application delivery methods that improve communication, integration and collaboration between development and operations. In layman’s terms, this means development and operations teams work on software releases in tandem, rather than throwing code back and forth across a silo. The result? Their collaboration helps companies release high-quality software and services to market faster and at lower cost.

    The “why” of DevOps is simple: In an ultra-competitive landscape where companies are racing to release the next big thing, software quality and speed-to-market are essential for achieving business goals and creating differentiation. It’s the “how” of DevOps that can be confusing. So let’s talk about where that begins – namely, with culture.

    A Vision for Transformation

    When it comes to something as significant as a culture shift, it’s not about just getting development and operations teams in the same room for a few meetings. We’re talking about breaking down long-standing silos and changing the human fabric intertwined with them – an undertaking that requires both top-down and bottom-up strategies for change.

    I talked earlier about the change Chad Dickerson brought with him when he joined Etsy as CTO. In a blog post from his early days in the position (he’s now the company’s CEO), Dickerson talked about the importance of “intellectual honesty,” which he described as “admitting when something is not working so you can work together to figure out how to fix it” and “measuring your successes and failures so you can properly reward for excellent work and learn from your failures so you can strive to never make the same mistake twice.”

    It’s clear from his words that Dickerson had a high-level vision almost from day one for how to transform Etsy’s IT operations, even as he admitted that there would be “bumps” along the way. This kind of vision is essential for driving the DevOps journey and keeping it on track as opposition, challenges and other issues crop up. It’s been said before that DevOps takes a village, but you can’t have a village without a chief.

    Populating the Village

    Speaking of the village, if the chief is supplying the top-down vision, it begs the question, who is going to carry that vision out? This can be tough to answer, especially in organizations where development and operations teams have been entrenched in siloed practices for decades.

    In my own experience, I’ve seen the village successfully get on board the DevOps journey when its involvement begins as a grassroots movement and grows with small wins over time. In other words, the chief pulls together a group of IT professionals with similar characteristics – think driven, highly skilled, unafraid of change – and they work to transform just a single deployment scenario (e.g., pushing out Web updates). At the end of that experiment, the team shares its experiences, challenges and successes with the larger IT group in the hopes of bringing more people on board and moving up to more significant deployment scenarios. Then, it’s rinse and repeat until the culture shift has occurred.

    It’s worth noting that in situations where the development and operations silos run especially deep, a rip-and-replace option may be the only viable one for achieving DevOps. In such cases, leadership has to put forth an edict saying “this is the way it’s going to be” and expect to deal with some attrition, as there will be employees who simply refuse to change.

    A Formula for Change

    We’ve talked about the chief and the village, but I’d be remiss if I didn’t touch on the nuts and bolts that are necessary for engineering such a culture change. Yes, top-down vision and buy-in from the bottom up are important, but so are the new tools, skills and processes required to support that change.

    There’s a reason the word “journey” is so often used with DevOps – it’s a never-ending cycle of optimization among the people, processes and technologies driving development and deployment operations. So as you evaluate your own culture and think about the next stop on your DevOps journey, remember this formula: vision + expertise + tools = change.

  • Step One Of DevOps Ignores Technology

    Step One Of DevOps Ignores Technology

    I’ve spent a bunch of time talking with Adrian Cockcroft, former cloud tzar at Neflix, and listening to his various talks and presentations. I’ve also spent a bunch of time looking around the various rooms within which he presents and seen the dazed look of attendees who have rightly assumed that just seen a picture of the way organizations should be. Netflix is unquestionably an exemplar for IT reinvented – where innovation, agility and developer enablement are natural parts of what they do.

    But then I’ve seen these new disciples of the “Netflix way” write a list of the technologies that Cockcroft detailed and attempt to shoehorn those same approaches into their own organization. All to often the result is disappointment, failed projects and a swing back to the traditional rigid ways of doing things.

    These thoughts struck me then I hear about this new masthead and its aim of creating a hub for DevLops thought leaders – surely giving IT practitioners a good place to find the latest tools and techniques will help spread the DevOps gospel?

    Well yes, and no. You see I’m a firm believer in the viewpoint that DevOps has very little to do with products, processes and policies, and instead is a direct result of a particular type of culture. On the one hand you have Netflix, clearly a cultural outlier with its openness, willingness to experiment, embracing of failure-driven iteration and aim of planning for failure. On the other hand you have traditional IT shops that are top-down, driven by a rigid policy framework and consider the “operations department” and the “developer team” as two distinct entities.

    This was a topic that Christian Reilly (he of the sartorial elegance and funny accent tendencies) and I discussed a couple of years ago, before the DevOps hype had really started to hit. In the video, he reflected directly on his organization, Bechtel, as an outlier at one end of the spectrum, while Netflix is an outlier at the other. It’s a somewhat dated video, and talks about public/private cloud, but the themes in terms of organizational readiness hold true for DevOps as well.

    [youtube http://www.youtube.com/watch?v=gVG1Pj4cW-g&hd=1]

    So my aim in my regularly irregular DevOps column in here is to talk about everything but the technology. And where better to start that the first step towards DevOps which is, I believe, all about building cultural bridges rather than making technology choices. It should be a natural concluding that, since DevOps is all about bridging the developer/operations span, that perhaps getting people in a room to talk about their particular drivers and metrics would be a good idea. But alas most people go from talking about DevOps to deploying their choice of automation tool.

    There’s so many things to think about in embarking on this process – over on the ScriptRock blog Alan points out that visibility is a key first step before automation is embarked upon. While I agree with him that visibility is key, for me the money quote comes in his post where he writes:

    Don’t automate what you don’t understand

    But to then suggest that the first step should instead be a visibility tool does little to improve the outcomes – unless both sides fo the organizational divide are in the same room and accepting a common lingua franca and viewpoint on the data – visibility achieves little. So takeaway #1 focus on the culture. There’s lots of ways to build the bridges needed to change the way an organization looks – I’m going to cover some of that stuff over time.

  • Why you can’t buy DevOps in a box

    Why you can’t buy DevOps in a box

    Companies will often believe they can buy their way out of technical debt without making any substantial changes. They often think they can buy DevOps in a box. Well, unfortunately, devops isn’t for sale. For an organization to embrace DevOps it will need to adopt cultural change, adopt tools which enable automation, and change processes to include both dev and ops. I like to think DevOps can be explained simply as operations working together with engineers to get things done faster in an automated and repeatable way.

    Culture

    Organizations large and small have experienced these changes, the challenges encountered along the way, and the light at the end of the tunnel. Each organization requires their own set of tools and processes to embrace DevOps. Cultural change largely depends on the existing dynamic of an organization. In small companies, I have found it needs to come from the ground up and usually starts with adding the DevOps toolchain. In large organizations the value of DevOps needs to be sold to the executive team and then enforced from the top down. This is a daunting challenge for most large companies because it’s hard to quantify the value of DevOps.

    Most organizations only quantify failure when it comes to IT outages. How many outages? For how long and how severe? They often don’t quantify the success from 100% uptime or the resilience of failing over with zero down time. The ability to instrument and prove to an organization the value of applying DevOps is a crucial step to making it happen. DevOps teams efficiently deploy features faster with far less bugs. Also, when outages happen they respond faster minimizing the business impact.

    From developer to operations – one and the same?

    As a developer I have always dabbled lightly in operations. I always wanted to focus on making my code great and let an operations team worry about setting up the production infrastructure. It used to be easy! I could just ftp my files to production, and voila! My app was live and it was time for a beer. Real applications are much more complex. As I evolved my skillset I started to do more and expand my operations knowledge.

    Tools

    During the development phase, the operations staff normally makes sure the development environment is managed and they actively work to set up the test, QA, and Prod environments. This can take a lot of time if automation tools aren’t used. Here are some tools you can use to automate server build and configuration. In another post I will dive through the pros and cons of each tool, but as long as you apply some form of configuration management and treat your infrastructure as code you will be on the right track.

    Process

    From an operational perspective, my first instinct is to understand the application architecture so I can start thinking about the proper deployment model for the infrastructure components. Here are some of my operational questions and considerations for this stage:

    • Are we using a public or private cloud?

    • What is the lead time for spinning up each component and ensuring they comply with my company’s regulations?

    • When do I need to provide a development environment to my dev team, or will they handle it themselves?

    • Does this application perform functions other applications or services can already handle?

    Operations should have high-level visibility into the application and service portfolio. From a development perspective, my first milestone is to make sure the ops team fully understands the application and what it takes to deploy it to a pre-production environment. This is where we the developers sync with the product and ops team and make sure we are aligned.

    Planning for the ops team:

    • What tools will we use for deployment and configuration management?

    • How will we automate the deployment process and does the ops team understand the manual steps?

    • How will we integrate our builds with our continuous integration server?

    • How will we automate the provisioning of new environments?

    • Capacity Planning – Do we know the expected production load?

    Once developers have built unit and functional tests we need to ensure the tests are running after every commit and don’t allow regressions in our promoted environments. In theory, developers should do this before they commit any code, but often times problems don’t show up until you have production traffic running under production infrastructure. The goal of this step is really to simulate everything that can go wrong and find out what happens and how to remediate.

    Combining the power of developers and operations

    The focus on the developer/operations collaboration enables a new approach to managing the complexity of real world operations. I believe the operations complexity breaks down into a few main categories: infrastructure automation, configuration management, deployment automation, log management, performance management, and monitoring.

    In my next post I will walk through each one of these complexities and address how you can get your organization inline.

  • Bootstrapping Chef (or Whatever) for Autoscaled EC2 Instances

    Bootstrapping Chef (or Whatever) for Autoscaled EC2 Instances

    I realize it is traditional to start writing a new blog with some background and a deep introspection as to the author’s personal motivation for writing said blog, but I’ve never been one for tradition. Thus, for my first official DevOps post, I think I’ll jump write in with a technical tutorial on a problem had to solve last summer that I haven’t seen well documented anywhere else.

    You can read my bio for more, but here’s what you can expect on HackOps. I’m an industry analyst (in security; I’m the CEO of Securosis), but one with a bad habit of giving technical talks at DEFCON. In other words, a mix of research and analysis at both a technical and executive level.

    The Problem

    With that, let’s start with the technical:

    Last summer I was putting together a demonstration for the Black Hat conference when I ran into a little roadblock. I wanted to launch instances and have them automatically connect to a Chef server and pull down a default set of (security) policies. The problem is there really isn’t a great, built-in way to do this, nor could I find one documented anywhere. Normally, your options to install Chef in an EC2 instance are:

    * Load Chef and the configuration into a custom Amazon Machine Image. I wanted to use default AMIs instead of maintaining my own, so this wouldn’t work.
    * Launch instances using the Knife command-line tool (how you manage Chef, for those of you who don’t know) and the EC2 option. But I want to autoscale my images, which means I can’t launch them from Knife, since Amazon Web Services will launch them for me.
    * Bootstrap instances after they are up and running using the SSH bootstrap. But this is manual, or requires me to embed my SSH key in some automagic code, so this wasn’t an option.
    * Manually install and configure Chef. Not very DevOpsy, is it?

    Now I already had some decent experience configuring instances when they launch using cloud-init. cloud-init is a tool included in some operating systems, most notably Ubuntu and Amazon Linux, that allows you to inject a script when you launch an instance and have it run the commands once it launches, before you get to log into it. You simply paste your script into the User Data field.

    Overview

    Chef isn’t actually well-designed to handle this, since it seems to prefer a hands-on install, but I managed to hack together an effective process. At the high level, here’s how it works:

    1. Place your chef configuration (client.rb), validation certificate (validation.pem), and initial first run Chef file (first_run.json) into an Amazon S3 bucket.
    2. Use AWS IAM Roles to provide access to the S3 bucket. IAM Roles are worth a post all on their own, but the short version is you set the role for an object with Amazon and it is provided a set of rotating, temporary credentials to access other bits of Amazon.
    3. Write a cloud-init script to download Chef and s3cmd, which is a command line tool for accessing Amazon S3.
    4. In your script, set s3cmd to work with IAM Roles by installing a blank configuration file (figuring this part our was a major pain since it wasn’t documented at the time).
    5. In your script, use s3cmd to pull down your Chef configuration files, and then install Chef with the configuration files we pulled from S3, one of which will run it for the first time and set the initial role, which Chef will use to push down the first policy set.
    6. Launch an instance manually or as part of an autoscaling group. Set the IAM Role, and paste your cloud-init script into the *User Data* field.

    Now I am assuming a few things here. First, that you know how to use EC2 and set the correct security groups for everything to talk to each other. Second, that you know how to create an autoscaling group (or manually launch an instance and set the User Data field). Third, that you have a Chef server or Hosted Chef set up already.

    If you want more of a step-by-step you can read up on this in a paper I published — A Practical Example of Software Defined Security. It is ever so slightly out of date, but still works (just adjust it to get a current version of S3 tools and cut the *fix routing silliness* part of the script since that isn’t needed anymore and breaks things).

    The Details

    Here are the technical details for the files and commands:

    First, for your IAM Role policy. Replace “cloudsec” with the name of whatever bucket you create to hold your client.rb, validator.pem, and first_run.json (I’ll give you an example one in a moment):

     

    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Effect": "Allow",
    "Action": [
    "s3:Get*",
    "s3:List*"
    ],
    "Resource": "arn:aws:s3:::cloudsec",
    "Resource": "arn:aws:s3:::cloudsec/*"
    }
    ]
    }

    Next comes your cloud-init script. You can either past the entire script in, or use the command:

    #include
    http://url-to-script

    If you use a remote script, you probably want to store it someplace safe in S3 where no one can see it and see how you have things configured. Here is the cloud-init script itself, where the magic happens (our blog platform messes up the formatting a bit, but it is still readable):

    #cloud-config

    apt_update: true

    #apt_upgrade: true

    packages:
    - curl

    configchef:
    - &configchef |
    echo "deb http://apt.opscode.com/ precise-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.list
    apt-get update
    curl http://apt.opscode.com/packages@opscode.com.gpg.key | sudo apt-key add -
    echo "chef chef/chef_server_url string http://your-chef-server-URL:4000" | sudo debconf-set-selections && sudo apt-get install chef -y --force-yes
    wget http://sourceforge.net/projects/s3tools/files/s3cmd/1.5.0-beta1/s3cmd-1.5.0-beta1.tar.gz
    tar xvfz s3cmd-1.5.0-beta1.tar.gz
    cd s3cmd-1.5.0-beta1/
    cat >s3cfg <<EOM
    [default]
    access_key =
    secret_key =
    security_token =
    EOM
    ./s3cmd --config /s3cmd-1.5.0-beta1/s3cfg ls s3://cloudsec/
    ./s3cmd --config /s3cmd-1.5.0-beta1/s3cfg --force get s3://cloudsec/client.rb /etc/chef/client.rb
    ./s3cmd --config /s3cmd-1.5.0-beta1/s3cfg --force get s3://cloudsec/validation.pem /etc/chef/validation.pem
    ./s3cmd --config /s3cmd-1.5.0-beta1/s3cfg --force get s3://cloudsec/first_run.json /etc/chef/first_run.json
    chef-client -j /etc/chef/first_run.json

    runcmd:
    - [ sh, -c, *configchef]
    - touch /tmp/done

    You’ll notice that when we launch Chef, we use the command line option to load first_run.json, which establishes out initial Chef role. This is what allows us to push an initial policy to the instance, otherwise we have to do more manual stuff (ick). I kept it simple and merely established a starter role for the instance, which corresponds to a basic run list. first_run.json looks like this:

    {“run_list”:[“role[base]”]}

    Once you get all this set up, as I mentioned earlier you only need to launch an instance with the right IAM Role to access the S3 bucket, then paste in the cloud-init script to the *User Data* field. This can all be set as part of your autoscaling group rules so it runs automatically as new instances launch.

    The rest is magic. The instance takes a little longer to run, and it can take a bit for all the pieces to connect, but we are talking less than 30 minutes. Usually a *lot* less than 30 minutes.

    Now while I used this as a security demo, I know this technique is used in product for at least one major web property you have all heard of for non-security configuration management. Not that I can take credit for it, I found out months later they use a really similar technique they figured out on their own.

    The same basic techniques should also work with Puppet or the configuration management tool of your choice.

    To be honest, I was pretty surprised I couldn’t find this process documented anywhere when I started my project. It seems like one of those basic things nearly anyone working in public cloud with a configuration management tool would need, since building your own AMIs all the time is really inefficient.

    That’s one of the big reasons I’m excited to be writing here at devopsy.kinsta.cloud, since I think we, as a community, need a good meeting place to share this kind of information.

  • So, you wanna DevOps?

    So, you wanna DevOps?

    How do you start your career in DevOps? How do I shift my team to use those approaches? This is a question I run into more and more frequently. Either while speaking to candidates, or among colleagues looking to move their IT operations into a more devops aligned culture.

    I want to look at that challenge from the perspective of a System Administrator. I’ve been an SA for 16 years now, and was able to fumble my way into being a pretty decent Devops Engineer. Much improved from fumbling, there are some clear objectives you can focus on that will get you there quicker.

    What isn’t devops?

    First, let’s talk about some of the differences between conventional SA and a DE. Many of these differences are direct results in the difference between conventional IT or Technical Operations and devops. A traditional SA role would involve

    • sole or shared on-call responsibilities only within the SA/NA teams

    • scripting for administration (bash, perl), very CLI based

    • silo’d from development, and possibly application support groups

    • heavy focus on stability and process

    • cultivating the walled garden

    Great DE’s share a similar skillset with SA’s – strong understanding of OS and networking concepts, deep familiarity with hardware or resource planning, diagnosis of performance bottlenecks, and instrumentation and tuning against servers or systems. In addition, DE’s

    • share on-call responsibilities with developers and overlap duties

    • utilize more robust languages (python, php, ruby), utilize web and database frameworks

    • embedded with day to day operations of development and application, actively contributing

    • heavy focus on innovation and agility

    • flat rejection of walled garden mentality

    There’s clearly a skillset component – in devops we’re writing code to admin and maintain systems, while implicitly acknowledge that systems are part of a broader ecosystem. I’m just as likely to address a file in an object storage system (s3, openstack) as I am on a file backed system. When I perform a system level action, I’m doing so because of a database flag, not a cronjob. I’m sending the result of a job to an API, not a filesystem log.

    But perhaps more importantly there is a mindset component – in devops we’re friends with the developers. I say that tongue in cheek, but am quite sure everyone reading this knows what I mean. The thing I’m most looking for in a devops engineer is their ability to relate to, and share responsibility with developers. I’m looking for developers who are excited to share responsibility with operations and contribute to the systems their code runs on. I think this is the most marked contrast between old world IT and devops – they integration of two traditionally warring tribes.

    So how do you start the transition?

    Code. Write code. Not shell, not perl. Perl is code, so is shell. Choose a language, it doesn’t matter much which, and write a basic CRUD app that you can interact with via a web browser. In my experience this kind of coding is rare in traditional SA focused folks, but absolutely critical for a DE. As part of your project, schedule at least 2 hours to feed the trolls about whether python is better than ruby.

    Puppet or chef. Stop everything you are doing and pick one of these up. Make yourself take an existing system and install apache on it using one of these tools. Configure apache using the tool. Make changes only in puppet or chef. As one recent AWS tips post said, disable ssh. In 2014 if you are not using puppet or chef you are terribly handicapped.

    Get into the cloud. Set up an EC2, Google Compute, or Azure environment. Start and stop instances only with API calls. Make sure that once started, the instances are applying a puppet recipe. You can have a functional playground for free, I’ve had a personal goof off area in ec2 for a couple years now. $18/month or so is a small investment in your career. Set yourself some basic tasks, and implement them in a cloud environment. 

    DevOps is here to stay, and is a massively impactful methodology for quick iteration against systems and code. Whether you’re at a startup, or an enterprise, or looking to shift… adding some basic devops tools to your bag o tricks will be time well spent!

  • DOCKERCON 2014

    dockercon14

    Registration and call for papers are now open for DockerCon 2014!

    DockerCon is a two-day Docker-centric conference organized by the team at Docker Inc. We’ll have speakers talking about Docker, DevOps, operations and development. Our talks will include topics that will interest Developers, SysAdmins as well as C-level executives.

    The conference will start with general session with keynotes in the mornings, untill 11:00am, followed by three different tracks:

    • Docker University
    • Docker for Developers
    • Docker for Ops & Sysadmins

    Docker University will be the place to learn about using Docker, building Docker images as well as learning about the Docker API.

    In the Docker for Developers track, you will learn about Docker best practices, CI/CD, orchestration, Registry, Docker-core, real-life use cases and more.

    The Docker for Ops & Sysadmins track will introduce you to Docker performance, metrics, security, scaling and orchestration.

    DockerCon is also the occasion to meet with the Docker eco-system: contributors, developers, devops, ops, hackers, partners, and also the Docker team including Solomon Hykes (Founder) andBen Golub (CEO).

    We are also organizing a Docker Hackathon during the week-end prior to DockerCon. Winners will be able to present their project during the conference. Register here if you would like to participate.

    We invite you to follow the official twitter account: @DockerCon, in order to get the latest updates.

    Happy Hacking!