Blog Archives

Setup Jenkins Job to start on Git Commit

 

This is the fifth post in the series of ‘Continuous Integration and Delivery with Docker Trusted Registry on Microsoft Azure’. This is a step by step guidance for implementing http://www.docker.com/sites/default/files/UseCase/RA_CI%20with%20Docker_08.25.2015.pdf on Microsoft Azure.

You can read the previous post in this series at https://manesh.me/2015/11/15/continuous-integration-and-delivery-with-docker-trusted-registry-on-microsoft-azure/. In the previous post, we have created a job in Jenkins to have on-demand start based on Git source repository. In this post, we will explore, how we can setup Git/Jenkins to work together to invoke the job for every check-in. To configure and try out this post, you will need write permission to Git repository. I am using a forked repository https://github.com/Manesh-R/hello-jenkins, for this post.

Prerequisites

  • Microsoft Azure Subscription
  • Followed steps in all prior posts
  • Write permission on Git repository (Forking the Git project will be the easiest way)

Setup Sequence

  • Configure GitHub Service Hook
  • Configure Build Trigger on Git Commit
  • Test build trigger with a commit to Git repository

Configure GitHub Service Hook

Open browser and navigate to your GitHub repository (https://github.com/Manesh-R/hello-jenkins). Note that you need admin permissions on the repository.

Click on Settings, then Webhooks & services and then Add service

Search for Jenkins and click on Jenkins (GitHub plugin)

Update Jenkins hook URL, keep service Active and click Add service.

Now for every commit to the repository, service hook will send notification to Jenkins.

Configure Build Trigger on Git commit

Open browser and navigate to http://mme-j-master.southcentralus.cloudapp.azure.com:8080/

Click on job dtr-cicd.

Click on Configure

In project details select Build when a change is pushed to GitHub in Build Triggers and click Save.

Test build trigger with a commit to Git repository

Open browser and navigate to https://github.com/Manesh-R/hello-jenkins/edit/master/README.md

Make a minor modification to the file content and commit changes directly to master.

Now you should see a build automatically triggering on Jenkins server based on the service hook notification. J

Summary

With this we have gone through the complete cycle of setting up a continuous integration / delivery pipeline using Docker & Jenkins on Microsoft Azure. If you have any questions, add a comment to the posts. Also, if you are interested in getting notified for new blog posts, follow me on Twitter – http://www.twitter.com/ManeshRavendran.

Setup Jenkins Job with Git Source

 

This is the fourth post in the series of ‘Continuous Integration and Delivery with Docker Trusted Registry on Microsoft Azure’. This is a step by step guidance for implementing http://www.docker.com/sites/default/files/UseCase/RA_CI%20with%20Docker_08.25.2015.pdf on Microsoft Azure.

You can read the previous post in this series at https://manesh.me/2015/11/20/setup-jenkins-slave-on-microsoft-azure-for-cicd-with-dtr/. You can find all posts in this series at https://manesh.me/2015/11/15/continuous-integration-and-delivery-with-docker-trusted-registry-on-microsoft-azure/.

Prerequisites

  • Microsoft Azure Subscription

Setup Sequence

  • Install and Configure GitHub plugin
  • Setup Build Job

Install and Configure GitHub plugin

Open browser and navigate to http://mme-j-master.southcentralus.cloudapp.azure.com:8080/

Click on Manage Jenkins

Click on Manage Plugins

Click Available, type GitHub in the filter, choose GitHub Plugin from the results, and click Download now and install after restart

Wait for install and upgrade of plugins to be complete.

Setup Build Job

From Jenkins dashboard, click New Item, provide item name ‘dtr-cicd‘, choose Freestyle project and click OK

For the project details, provide following information and click Save

  • GitHub Project: https://github.com/mikegcoleman/hello-jenkins/
  • Restrict where this project can be run (Choose this option and provide docker as label expression)
    • docker
  • Source Code Management: Git
  • Repository URL: https://github.com/mikegcoleman/hello-jenkins.git
  • Build > Add Build Step > Execute Shell

    #build docker image

    sudo docker build –pull=true -t mme-dtr.southcentralus.cloudapp.azure.com/hello-jenkins:$GIT_COMMIT .

     

    #test docker image

    sudo docker run -i –rm mme-dtr.southcentralus.cloudapp.azure.com/hello-jenkins:$GIT_COMMIT ./script/test

     

    #push docker image

    sudo docker push mme-dtr.southcentralus.cloudapp.azure.com/hello-jenkins:$GIT_COMMIT

Click on Build Now from the job page.

You should see that project builds successfully. J

Note: You can configure build schedule to be initiated when a change is pushed to GitHub.

Setup Jenkins Slave on Microsoft Azure for CICD with DTR

This is the third post in the series of ‘Continuous Integration and Delivery with Docker Trusted Registry on Microsoft Azure’. This is a step by step guidance for implementing http://www.docker.com/sites/default/files/UseCase/RA_CI%20with%20Docker_08.25.2015.pdf on Microsoft Azure.

You can read the previous post in this series at https://manesh.me/2015/11/15/continuous-integration-and-delivery-with-docker-trusted-registry-on-microsoft-azure/.

Prerequisites

  • Microsoft Azure Subscription

Setup Sequence

  • Create virtual machine for Jenkins Slave
  • Assign DNS name for Jenkins Slave machine
  • Install JRE on Jenkins Slave
  • Install and Configure Docker Engine on Jenkins Slave
  • Register slave node in Jenkins Master

Create virtual machine for Jenkins Slave

Open browser and navigate to https://portal.azure.com/

From Azure Portal, click New, then Compute, then Marketplace

Type Ubuntu Server in the search box and press Enter, then click on ‘Ubuntu Server 14‘ from the search results

Read virtual machine image description, choose Resource Manager as the deployment model and click Create

Note: It is important to choose ‘Resource Manager’ deployment model, to have this created in the same resource group of DTR and Jenkins Master.

Provide basic configuration details for the virtual machine (you can change details as per your environment) and click OK

  • Name: mme-j-slave01
  • User name: cicdagent
  • Authentication Type: Password
  • Password: Azure101!
  • Resource Group: DTR
    • Select existing Resource Group, you created for DTR virtual machine
  • Location: South Central US

For size configuration, choose D1 Standard and click Select

Choose default values for optional configurations, and click OK

Review summary details and click OK

Wait for virtual machine to get into state ‘Running’.

Assign DNS Name for Jenkins Slave

Follow the similar steps in previous post to create a DNS name label for the virtual machine. In my environment FQDN of the virtual machine is mme-j-slave01.southcentralus.cloudapp.azure.com

Install JRE on Jenkins Slave

Use SSH to connect to Jenkins Slave machine and execute the following commands.

ssh cicdagent@mme-j-slave01.southcentralus.cloudapp.azure.com

# install jre package on the virutal machine

sudo apt-get install default-jre

Install and Configure Docker Engine on Jenkins Slave

Use SSH to connect to Jenkins Slave machine and execute the following commands.

ssh cicdagent@mme-j-slave01.southcentralus.cloudapp.azure.com

# download and install CS Engine

curl -s https://packagecloud.io/install/repositories/Docker/cs-public/script.deb.sh | sudo bash

sudo apt-get install docker-engine-cs

Since we do not have a valid SSL certificate on Docker Trusted Registry server for HTTPS, we need to ensure that docker service starts with ‘–insecure-registry mme-dtr.southcentralus.cloudapp.azure.com’ option. For this we need to edit /etc/default/docker file.

You can use vim editor to make required changes on the file. To start inserting text in vim, press the ‘i’ key to enter insert mode. When you have finished editing, press ESC to exit insert mode, then type ‘:wq’ to save and exit the editor.

sudo vim /etc/default/docker

Once the file is updated, reboot the Jenkins Slave virtual machine.

sudo reboot

Register slave node in Jenkins Master

Open browser and navigate to http://mme-j-master.southcentralus.cloudapp.azure.com:8080

Click on Manage Jenkins

Click on Manage Nodes

Click on New Node

Enter mme-j-slave01 as the node name, choose option dump slave and click OK

On node details page, provide slave node information. Click on Add button for credentials and create a username with password credential. It is important to keep label for node as docker. This label is used later to associate Jenkins Job to the slave node.

You should see that the node is added and is in active state.

Next Blog

You can read the next post in this blog series here, <TODO>.

Setup Jenkins Master on Microsoft Azure for CICD with DTR

This is the second post in the series of ‘Continuous Integration and Delivery with Docker Trusted Registry on Microsoft Azure’. This is a step by step guidance for implementing http://www.docker.com/sites/default/files/UseCase/RA_CI%20with%20Docker_08.25.2015.pdf on Microsoft Azure.

You can read all the posts in this series at https://manesh.me/2015/11/15/continuous-integration-and-delivery-with-docker-trusted-registry-on-microsoft-azure/.

Prerequisites

  • Microsoft Azure Subscription

Setup Sequence

  • Create virtual machine for Jenkins Master
  • Assign DNS name for Jenkins Master virtual machine

Create virtual machine for Jenkins Master

Open browser and navigate to https://portal.azure.com/

From Azure Portal, click New, then Compute, then Marketplace

Type Docker Jenkins in the search box and press Enter, then click on ‘Jenkins‘ from publisher ‘Docker‘ in the search results

Read virtual machine image description and click on Create

Provide basic configuration details for the virtual machine (you can change details as per your environment) and click OK

  • Name: mme-j-master
  • User name: cicdagent
  • Authentication Type: Password
  • Password: Azure101!
  • Resource Group: DTR
    • Select existing Resource Group, you created for DTR virtual machine
  • Location: South Central US

For size configuration, choose D1 Standard and click Select

Choose the default Settings for ‘Configure optional features‘ and click OK

Review the summary details and click OK

Initial virtual machine will show status as ‘Deploying‘, wait until it turns to ‘Running‘. I have seen it taking more than couple of minutes to deploy and configuring everything before getting into running state.

Assign DNS name for Jenkins Master virtual machine

Follow the similar steps in previous post to create a DNS name label for the virtual machine. In my environment FQDN of the virtual machine is mme-j-master.southcentralus.cloudapp.azure.com

Once virtual machine is in running state and DNS name label is assigned, browse to
http://mme-j-master.southcentralus.cloudapp.azure.com:8080

Next Blog

You can read the next post in this blog series here, https://manesh.me/2015/11/20/setup-jenkins-slave-on-microsoft-azure-for-cicd-with-dtr/.

Setup Docker Trusted Registry on Microsoft Azure

This is the first post in the series of ‘Continuous Integration and Delivery with Docker Trusted Registry on Microsoft Azure’. This is a step by step guidance for implementing http://www.docker.com/sites/default/files/UseCase/RA_CI%20with%20Docker_08.25.2015.pdf on Microsoft Azure.

You can read all the posts in this series at https://manesh.me/2015/11/15/continuous-integration-and-delivery-with-docker-trusted-registry-on-microsoft-azure/.

Prerequisites

  • Microsoft Azure Subscription

Setup Sequence

  • Create virtual machine for Docker Trusted Registry
  • Assign DNS name for DTR virtual machine
  • Download DTR License from Docker Hub
  • Update settings of DTR virtual machine

Create virtual machine for Docker Trusted Registry

Open browser and navigate to https://portal.azure.com/

From Azure Portal, click New, then Compute, then Marketplace

Type Docker in the search box and press Enter, then click on ‘Docker Trusted Registry‘ from the search results

Read the description of marketplace virtual machine image for DTR and click Create

Provide basic configuration details for the virtual machine (you can change details as per your environment) and click OK

  • Name: mme-dtr
  • User name: cicdagent
  • Authentication Type: Password
  • Password: Azure101!
  • Resource Group: DTR
  • Location: South Central US

For size configuration details, choose D2 Standard and click Select

Choose default settings for optional features, and click OK

Review summary details and click OK

Review buy / offer details and click Purchase

Now you will see that Docker Trusted Registry is Deploying. Wait for the virtual machine to be in Running state.

Assign DNS name for DTR virtual machine

Click on Virtual Machines (remember, we created the virtual machine with Resource Manager as the deployment model) and click on mme-dtr

Click on Public IP Address

Click on Configuration, enter mme-dtr for DNS name label and click Save. Note that sometimes dns names might be already reserved by someone else, so choose different name if the default vm name is not available.

Ensure you can browse to the virtual machine with public DNS name. In this case it is https://mme-dtr.southcentralus.cloudapp.azure.com. Ignore the certificate error.

Download DTR License from Docker Hub

Open browser and navigate to https://hub-beta.docker.com/enterprise/

Login to the portal. If you do not have an account, sign up first and login to the portal.

Once logged in, navigate to https://hub.docker.com/enterprise/ and click on Get Stated for Trial. Note that based on your requirement, you can choose other subscriptions as well. Also, however we started on hub-beta.docker.com, it redirects back to hub.docker.com

Private your contact information and click on ‘Start Your Free Trial’

Click on down arrow near your username, and click on Settings

Click on Licenses and then on Download icon

Save the downloaded docker_subscription.lic file in your local machine.

Update settings of DTR virtual machine

Open browser and navigate to https://mme-dtr.southcentralus.cloudapp.azure.com/admin/

Click on the warning shown on the dashboard page.

Provide fully qualified domain name and click Save and restart.

Note: I was not able to get the save button working properly on Internet Explorer. It worked well for me on Chrome. Also, server might take about 30 seconds to reboot.

Wait for 30 seconds, refresh the browser and ensure that the ‘domain name missing‘ warning is no longer there.

Click on the ‘Unlicensed copy’ warning message

Click on Choose File, select the downloaded license file from local machine and click on Save and restart

Once license is applied successfully, you should see the Tier getting updated to Trial

Next Blog

You can read the next post in this blog series here, https://manesh.me/2015/11/18/setup-jenkins-master-on-microsoft-azure-for-cicd-with-dtr/.

Continuous Integration and Delivery with Docker Trusted Registry on Microsoft Azure

Docker enables developers and sysadmins to build, ship and run distributed applications anywhere. Use cases are a great way to adopt technology to tackle specific technical or business challenges your team is trying to solve. Docker has provided guidance and a reference architecture for CI/CD with Docker. You can find it at http://www.docker.com/sites/default/files/UseCase/RA_CI%20with%20Docker_08.25.2015.pdf

In this series of blog posts, I will be exploring and implementing this RA fully on Microsoft Azure.

You can download all the original word documents I used to author this blog series from https://gallery.technet.microsoft.com/Continuous-Integration-and-c5ecb6a8. If you have questions, you can add comments to this blog. If you liked my blog series, you can follow me on Twitter at https://www.twitter.com/ManeshRavendran/

Getting started with Chef on Microsoft Azure

You can find an initial set of blog posts to help you get started with Chef on Microsoft Azure here. If you are new to Chef, I recommend you to go through some of the Chef tutorials https://learn.chef.io/. Objective of these posts are not to go deep into Chef, but to help you setup your whole set of machines (Chef Workstation, Chef Server, Chef Node) on Microsoft Azure.

https://manesh.me/2015/10/17/setup-chef-workstation-on-microsoft-azure/

  • Create a virtual machine for workstation
  • Install Chef Development Kit
  • Learn Chef Basics on Ubuntu

https://manesh.me/2015/10/19/setup-chef-server-on-microsoft-azure/

  • Create Virtual Machine
  • Set DNS Name Label for virtual machine
  • Configure Chef Server
  • Create Organization
  • Establish Connectivity from Workstation

https://manesh.me/2015/10/20/setup-chef-node-on-microsoft-azure/

  • Install Azure CLI & Login
  • Create Virtual Machine for Node
  • Bootstrap & Verify Node

https://manesh.me/2015/10/23/writing-cookbook-on-microsoft-azure/

  • Create cookbook on workstation
  • Upload cookbook to server
  • Add cookbook to run list of node
  • Run chef-client on node
  • Enable endpoint using Azure CLI

In the next set of blogs, I will walk you through in detail on various Azure Knife commands as well as using Chef along with Azure Resource Manger templates.

If you have feedback or questions, write a comment for the blog.

Writing cookbook on Microsoft Azure

This is the fourth post in the Chef and Microsoft Azure blog series. You can read the previous ones at:

  1. https://manesh.me/2015/10/17/setup-chef-workstation-on-microsoft-azure/
  2. https://manesh.me/2015/10/19/setup-chef-server-on-microsoft-azure/
  3. https://manesh.me/2015/10/20/setup-chef-node-on-microsoft-azure/

Writing cookbook is similar to how you would write it on other infrastructure. To get started with cookbook on Azure, I am exploring a cookbook to setup apache web server and show home page. Also, this will show you how to upload cookbook to the Chef Server, and set the run list for Chef Node via knife. This blog focus on getting your first cookbook on Azure. This do not go into details of cookbook components, if you would like to learn more about that refer https://docs.chef.io/cookbooks.html and https://learn.chef.io/manage-a-web-app/ubuntu/

Prerequisites

  • Microsoft Azure Subscription
  • Have gone through previous three posts in the series

Setup Sequence

  • Create cookbook on workstation
  • Upload cookbook to server
  • Add cookbook to run list of node
  • Run chef-client on node
  • Enable endpoint using Azure CLI

Create cookbook on Workstation

Execute the following commands from the workstation.

# move to home directory

cd

# move to chef-repo directory in home

cd chef-repo

# create new cookbook named webserver

knife cookbook create webserver

Edit the default recipe for webserver and update content of the file to following. vim editor comes default in the instance, so you could use that. To start inserting text in vim, press the ‘i’ key to enter insert mode. When you have finished editing, press ESC to exit insert mode, then type ‘:wq’ to save and exit the editor.

# edit the default recipe

vim cookbooks/webserver/recipes/default.rb

Add index.html file to cookbook’s files/default directory and edit the content.

edit the default index file

vim cookbooks/webserver/files/default/index.html

Upload cookbook to Server

Execute the following commands from the workstation.

# move to home directory

cd

# move to chef-repo directory in home

cd chef-repo

# upload the cookbook to Chef Server

knife cookbook upload webserver

Add cookbook to run list of node

Execute the following commands from the workstation.

# move to home directory

cd

# move to chef-repo directory in home

cd chef-repo

# Add cookbook to the run list of node

knife node run_list add mme-chef-node1 “recipe[webserver]”

Run chef-client on node

Execute the following commands from the Chef Node.

# running chef-client on mme-chef-node1

sudo chef-client

# Ensure that webserver is available on port 80

curl http://localhost/

We have created and executed our first runbook on Azure now. You can learn more about cookbooks from http://learn.chef.io/

Enable endpoint using Azure CLI

We have tested and ensured that web server is running and default index file is returned correctly. However, if you try out http://mme-chef-node1.cloudapp.net/ , the public endpoint 80 of the webserver, you will not get any contents. This is because we only have port 22 in the endpoints of Azure VM. To enable port 80 using Azure CLI, follow the below commands from workstation node.

Login to Azure CLI using your preferred option (Microsoft Account, Organizational Account or Service Principal), following the blog https://manesh.me/2015/10/15/options-for-azure-cli-logins-step-by-step-guidance/

Once you are logged into Azure CLI, execute the following command to check the current details of the virtual machine. Check endpoint information from the result.

Create new endpoint on port 80. Keep both public port and private port to be 80.

Now we can browse to http://mme-chef-node1.cloudapp.net/ and see that index page is available.

Next Blog

With this blog, we have gone through the basics of working with Chef on Microsoft Azure. In the next series of blogs, I will dive deep into using Azure specific knife commands and using Chef along with Azure Resource Manager templates.

Setup Chef Node on Microsoft Azure

This is the third post in the Chef and Microsoft Azure blog series. You can read the previous ones at:

  1. https://manesh.me/2015/10/17/setup-chef-workstation-on-microsoft-azure/
  2. https://manesh.me/2015/10/19/setup-chef-server-on-microsoft-azure/

These blog posts will help you to learn Chef, by going through all the tutorials provided by Chef – https://learn.chef.io/tutorials/ – from Microsoft Azure. In the previous posts, we have gone through the setup of a workstation as well as server. In this post, I am exploring the tutorial https://learn.chef.io/manage-a-node/ubuntu/bootstrap-your-node/

One feedback I received is to automate using script as much as possible, than going through the web user interface. I will try to use scripts to the maximum extent possible.

Prerequisites

  • Microsoft Azure Subscription
  • Have gone through previous two posts in this series

Setup Sequence

  • Install Azure CLI & Login
  • Create Virtual Machine for Node
  • Bootstrap & Verify Node

Install Azure CLI and Login

Let us make sure that we have Azure CLI on the workstation server. Execute the following commands from the workstation (We have an Ubuntu 14.04 image for the workstation).

# https://azure.microsoft.com/en-us/documentation/articles/xplat-cli-install/#install-and-use-nodejs-and-npm

sudo apt-get install nodejs-legacy

sudo apt-get install npm

sudo npm install -g azure-cli

Login to Azure service from CLI. I have written a detailed step by step guidance for the same at https://manesh.me/2015/10/15/options-for-azure-cli-logins-step-by-step-guidance/. If you are looking for complete automation without any user interaction, check out the login option using service principal.

Create Virtual Machine for Node

Next, let us create a new virtual machine to act as the Chef Node. We are executing following commands from the workstation.

# list all azure vm images for Ubuntu 14.04

azure vm image list | grep -i Ubuntu-14_04

# Note that latest image is coming at the end in the list

# Note that image name is second item in the item row

# Get the latest (last) image from the list

imagename=`azure vm image list | grep -i Ubuntu-14_04 |tail -1 | awk ‘{print $2}’`

# Learn about azure vm create options

azure help vm create

# Create a new vm for Chef Node

# vm create [options] <dns-name> <image> [userName] [password]

# SSH port 22 is enabled in endpoints as we use option -e

azure vm create -e -z Small -l “South Central US” mme-chef-node1 $imagename azureuser Demo@Pass1

# Wait for couple of minutes and ensure that Status of vm created is ReadyRole

azure vm list

Bootstrap and Verify Node

From the workstation, execute the bootstrap command remotely to bootstrap the node.

# ensure you are executing these from chef-repo directory

cd

cd chef-repo

# test connection to server, we should see contoso-validator

knife client list

# knife bootstrap ADDRESS -x USER -P PASSWORD –sudo –use-sudo-password –node-name NAME

knife bootstrap mme-chef-node1.cloudapp.net -x azureuser -P Demo@Pass1 –sudo –use-sudo-password –node-name mme-chef-node1

# verify that node is successfully bootstrapped

knife node list

Also, you can see the node listed in the Chef Management Portal.

Next Blog

Next, I will try out authoring some basic cookbooks and applying that policy to the node.

Setup Chef Server on Microsoft Azure

This is the second post in the Chef and Microsoft Azure blog series. You can read the first blog in this series at https://manesh.me/2015/10/17/setup-chef-workstation-on-microsoft-azure/

In this blog, I am exploring how to setup a Chef Server on Microsoft Azure. For most part, I followed the steps suggested in https://docs.chef.io/azure_portal.html

Prerequisites

  • Microsoft Azure Subscription

Setup Sequence

  • Create Virtual Machine
  • Set DNS Name Label for virtual machine
  • Configure Chef Server
  • Create Organization
  • Establish Connectivity from Workstation

Create Virtual Machine

Navigate to https://portal.azure.com and login using your credentials.

Click New, then Compute, then Marketplace

Search for Chef Server, then select Chef Server 12, BYOL.

Note: Chef provides a fully functional Chef server that can be launched from the Azure Marketplace. This server is preconfigured with Chef Server, the Chef Management console, Chef reporting, and Chef Analytics. This configuration is free to use for deployments under 25 nodes, and can be licensed for deployments beyond 25 nodes.

Choose Resource Manager as the deployment model and click Create

Provide basic settings and click OK.

Click Size, then A5 Standard, then Select

Click Settings and then OK. Choose the default options, unless you want to change something.

Click Summary, review summary and click OK

Click Buy on left menu, review offer details and click Buy button

Wait for the newly created server to be in Running state.

Set DNS Name Label for virtual machine

Click Virtual machines, then mme-chef-server

Click on IP Address

Click on Settings, then Configuration

Update DNS name label and click Save

DNS name for the virtual machine in this case is ‘mme-chef-server.southcentralus.cloudapp.azure.com’. Wait for 5 minutes and check if you are able to ssh to the server using ‘ssh chefadmin@mme-chef-server.southcentralus.cloudapp.azure.com

Configure Chef Server

Open Git Bash and run the following commands.

# Here chefadmin is the admin user created during virtual machine creation.

# Provide DNS name label of the virtual machine

ssh chefadmin@mme-chef-server.southcentralus.cloudapp.azure.com

#sudo chef-setup -u <username> -p <password> -d <fqdn>

#Here username is a new user, which will be created in this process.

# You will use this username to connect form portal

sudo chef-setup -u admin -p Demo@Pass1 –d mme-chef-server.southcentralus.cloudapp.azure.com

Create Organization

Browse https://mme-chef-server.southcentralus.cloudapp.azure.com

Enter Username (specified during chef-setup), Password (specified during chef-setup) and click Sign In

Click Create New Organization

Provide Full Name, Short Name, then click Create Organization

Click on Administration, then Organizations, then contoso

Click Starter Kit, then Download Starter Kit

Click Proceed

Save chef-starter.zip locally. In my machine (Windows Laptop), it saved by default in the Downloads folder.

Establish Connectivity from Workstation

Copy the downloaded chef-starter.zip from local machine to Chef Workstation (I am copying it to workstation, I created as per the first blog in this series). I used the following command to copy the file from Git Bash. You might have to change according to your environment.

scp Downloads/chef-starter.zip azureuser@mme-chef-ws.cloudapp.net:/home/azureuser

SSH into workstation

ssh azureuser@mme-chef-ws.cloudapp.net

Execute following commands to get SSL keys and test connection to Chef Server

# move to home directory of azureuser

cd

# install unzip utility

sudo apt-get install unzip

# unzip the starter kit

unzip chef-starter.zip

# move to chef-repo directory

cd chef-repo

# retrieve SSL keys from server

knife ssl fetch

# test connection to server, we should see contoso-validator

knife client list

Next Blog

Next, I will try out adding a Chef Node to the organization and running cookbooks.

hyper-v.nu

My views on technology

yungchou

witnessing a clear cloudy day

Virtualization and some coffee

My views on technology

Thomas Maurer

Cloud and Virtualization

Cloud Administrator

Begin Your Journey to the Cloud with the Cloud Administrator