How to implement CICD for IaC in practice - part 1: Setting up organization and project

How to implement CICD for IaC in practice - part 1: Setting up organization and project

TL;TR

Welcome to the guide on creating an Azure DevOps organization and projects! This article will show you how to set up an organization to manage your projects and resources and create a new project. We'll also introduce Azure CLI, a tool that allows you to automate tasks and streamline your workflow on Azure and beyond. Follow this step-by-step instruction to get started with Azure DevOps, and use Azure CLI to take your project to the next level. It is also a prerequisite for further Infrastructure as Code and quality assurance topics.

Unlock the Power of Azure DevOps: Step-by-Step Guide to Creating Your Organization

Are you looking to establish an Azure DevOps organization to manage your projects and resources? Great! Here's how you can do it:

  1. Make sure you have a Microsoft, GitHub, or work/school account, and decide whether you want to connect your organization to Azure Active Directory.
  2. Remember that all organizations must be manually created through the web portal. However, automated organization configuration, project creation, and resource provisioning are supported through the REST API.
  3. Plan out your organizational structure and ensure your organization name follows these guidelines: use only letters from the English alphabet, start with a letter or number, and end with a letter or number. You can also use hyphens.
  4. To create your organization:
  • Sign in to Azure DevOps, select "New organization,"
  • Confirm the information, and then click "Continue."
  • You're now the owner of your organization!

You can sign in to your organization anytime at https://dev.azure.com/{yourorganization}.

As a member of your organization, you'll have access to the following features in the free tier:

  • The first five users have Basic licenses.
  • Azure Pipelines includes one Microsoft-hosted CI/CD with one concurrent job (up to 30 hours per month) and one self-hosted CI/CD concurrent job.
  • Azure Boards offers work item tracking and Kanban boards.
  • Azure Repos provides unlimited private Git repositories.
  • Azure Artifacts includes two GiB of storage per organization.

Step into the Future of Project Management: How to Create Your Project on Azure DevOps

Are you ready to take your project to the next level with Azure DevOps? Follow these steps to get started:

  1. Make sure you have an organization in Azure DevOps. If you don't have one yet, you can create one by following the instructions in the "Create an organization" section.
  2. Sign in to your organization at https://dev.azure.com/{yourorganization}.
  3. Select "New project."
  1. Please fill out the form with a name for your project (note that it can't contain special characters, must be 64 characters or fewer, and can't begin or end with a period) and an optional description.
  2. Choose the visibility, initial source control type, and work item process for your project.
  1. Select "Create."

On the project welcome page, you can invite others to your project, add work items, clone or import a repository, define a pipeline, create test plans and suites, discover and publish packages, and manage your services.

Keep in mind that you can create up to 1000 projects within an organization in Azure DevOps. And remember, you must be a member of the Project Collection Administrators group or have the collection-level "Create new projects" permission set to Allow to create of a new project. If you're the Organization owner, you're automatically added to the Project Collection Administrators group.

Streamline Your Project Creation with Azure CLI: An Automated Approach to Managing Azure DevOps

But creating a project manually is tedious and time-consuming. Let us use azure cli for it.

Side note:

Azure Command-Line Interface (CLI) is a set of open-source cross-platform commands that helps developers manage Azure resources. It is available on Windows, macOS, and Linux platforms, and can be used to create, manage, and remove Azure resources from the command line.

With Azure CLI, you can automate tasks, create and manage resources, and deploy applications using scripts. It is a powerful tool that allows you to perform various operations on Azure resources, such as creating virtual machines, managing storage accounts, and deploying web applications.

Azure CLI can be used with Azure Cloud Shell, a browser-based shell that provides an Azure-tailored environment for running CLI commands. It can also be installed locally on your computer, allowing you to run Azure CLI commands from any terminal window.

Azure CLI is a valuable tool for developers who want to streamline their workflow and automate tasks on Azure and beyond.

az devops project create --name	[--description]
	[--open]
	[--org]
	[--process]
	[--source-control {git, tfvc}]
	[--visibility {private, public}]

Parameters

  • name: Required. Name of the project to create.
  • Description Optional: A short description of the project is enclosed in quotes.
  • Open Optional. Once the command creates, a project opens in the default web browser.
  • Org Optional. Azure DevOps organization URL. Required if not configured as default or picked up by using git config. You can configure the default organization using az devops configure -d organization=ORG_URL. Example: https://dev.azure.com/MyOrganizationName/.
  • Process: Optional. The process model to use, such as Agile, Basic, Scrum, CMMI, or other custom process model. Agile is the default. To learn more, see About process customization and inherited processes.
  • Source-control: Optional. Type of source control repository to create for the project: git (default) or tfvc. If not, name or ID of the project. Example: --project "engex dev".
  • Visibility: Optional. Project visibility. Accepted values: private (default), public.

The following command creates a new project named MyFirstProject under the engex organization. The project has the Agile process and git source control.

az devops project create --name MyFirstProject
	--description "Test project 1"
	--org https://dev.azure.com/engex/
	--process Agile
	--source-control  git
	--output table

Summary

In summary, Azure DevOps is a robust platform that allows you to manage your projects and resources effectively. You can establish a central location to store and collaborate on your code, plan and track work, and scale up your enterprise by creating an organization in Azure DevOps. You can use a Microsoft, GitHub, or work/school account to make your organization and connect it to Azure Active Directory if desired. Once you have your organization set up, you can create up to 1000 projects within it and take advantage of the various features offered in the free tier, such as Azure Pipelines, Azure Boards, Azure Repos, and Azure Artifacts.

To streamline your workflow and automate tasks on Azure, consider using Azure CLI. This set of open-source cross-platform commands allows you to create, manage, and remove Azure resources from the command line. Azure CLI is available on Windows, macOS, and Linux platforms and can be used in combination with Azure Cloud Shell or installed locally on your computer. With Azure CLI, you can create and manage resources, deploy applications using scripts, and automate tasks. It is a valuable tool for developers looking to increase efficiency and optimize their workflow on Azure.

Subscribe to EngEX

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe