CDK for Azure is an early experimental project and the development folks would love your feedback to help guide the project.
- Report a bug
- Request a new feature.
- Browse all open issues.
- Public roadmap.
- Ask a question on Stack Overflow and tag it with
armkit
- Come join the Armkit community on Slack
We welcome community contributions and pull requests. See CONTRIBUTING for information on how to set up a development environment and submit code.
Armkit
, Azure Cloud Development Kit (CDK), is an open source software development framework to define cloud Infrastructure as Code (IaC) and provision it through Azure ARM Templates
.
It offers a high-level object-oriented abstraction to define Azure
resources imperatively using the power of modern programming languages. Using the Armkit
library of infrastructure constructs, you can easily encapsulate Azure best practices in your infrastructure definition and share it without worrying about boilerplate logic.
Armkit
is available in the following languages:
- JavaScript/TypeScript (Node.js ≥ 12.17.0)
Developers use the Armkit
framework in one of the supported programming
languages to define reusable cloud components called constructs
, which
are composed together into stacks
, forming an "Armkit
app".
They then use the Armkit CLI to interact with their Armkit
app. The CLI allows developers to synthesize artifacts such as Azure ARM Templates
, deploy stacks
to development Azure
accounts and diff
against a deployed stack
to understand the impact of a code change.
The Armkit Construct Library includes a module for each Azure
service with constructs that offer rich APIs that encapsulate the details of how to use Azure. The Armkit
Construct Library aims to reduce the complexity and glue-logic required when integrating various Azure
services to achieve your goals on Azure.
Armkit packages:
- @armkit/core - A library that allows users to build Azure applications contructs.
- armkit-resources - A library for defining Azure resources using programming constructs.
- armkit-cli - A CLI that allows users to run commands to initialize, import, and synthesize
Armkit
applications.
Some sample constructs
are in examples. This could look like this:
import { Construct } from "constructs";
import { App, ArmStack } from "@yetics/armkit-core";
import {
ContainerGroups,
ContainerGroupPropertiesOsType,
MicrosoftContainerInstanceContainerGroupsType,
MicrosoftContainerInstanceContainerGroupsApiVersion,
} from "./.generated/ContainerInstance-2021-03-01";
import {
Registries,
MicrosoftContainerRegistryRegistriesApiVersion,
MicrosoftContainerRegistryRegistriesType,
SkuName,
} from "./.generated/ContainerRegistry-2019-05-01";
export class HelloArmkit extends ArmStack {
constructor(scope: Construct, id: string) {
super(scope, id);
new ContainerGroups(this, "MyContainerGroup", {
name: "azurecdktest",
location: "westeurope",
apiVersion:
MicrosoftContainerInstanceContainerGroupsApiVersion["2021_03_01"],
type:
MicrosoftContainerInstanceContainerGroupsType.MICROSOFT_CONTAINER_INSTANCE_CONTAINER_GROUPS,
properties: {
containers: [
{
name: "ubuntu-server",
properties: {
image: "ubuntu:18.04",
command: ["sleep infinity"],
resources: {
requests: {
cpu: 1,
memoryInGB: 2,
},
limits: {
cpu: 1,
memoryInGB: 2,
},
},
},
},
],
osType: ContainerGroupPropertiesOsType.LINUX,
},
});
new Registries(this, "azurecdktest", {
name: "azurecdktest",
location: "westeurope",
apiVersion: MicrosoftContainerRegistryRegistriesApiVersion["2019_05_01"],
type:
MicrosoftContainerRegistryRegistriesType.MICROSOFT_CONTAINER_REGISTRY_REGISTRIES,
sku: {
name: SkuName.BASIC,
},
properties: {
adminUserEnabled: false,
},
});
}
}
const app = new App({ outdir: "cdk.out" });
new HelloArmkit(app, "hello-armkit");
app.synth();
For a detailed walk through, see the Armkit Developer Guide.
Clone the project repository
git clone https://github.com/Yetics/armkit.git
Download dependencies and build node.js
cd armkit/
yarn install
yarn build
Build the examples/basic
package:
Go to examples/basic
:
cd /examples/basic
Generate the armkit cdk
libs:
yarn generate
Translate typescript
to node.js
:
yarn build
Render ARM template from CDK:
node index.js
Check out the results:
az deployment group create --resource-group <resource-group-name> --template-file @cdk-out/helloarmkit.json
The Armkit Roadmap project board lets developers know about our upcoming
features and priorities to help them plan how to best leverage Armkit
and identify opportunities to contribute to the project. See ROADMAP for more information and FAQs.
Armkit
Roadmap project board: https://github.com/Armkit/armkit/projects/1- Roadmap: https://github.com/Armkit/armkit/ROADMAP.md
Armkit
is distributed under the Apache License, Version 2.0.