Skip to main content

Attini CDK Constructs

Project description

Attini CDK

The Attini CDK library contains AWS CDK constructs for creating Attini deployment plans using the CDK.

Attini allowed users to write deployment logic and package it together with the resources being deployed. The deployments are performed from within the AWS account and uses only serverless resources.

Together with the CDK the deployment logic can be we written in different programming languages.

For more information about Attini. Please visit the website. There are several guides on how to get started with different tasks.

Also check out the cdk examples repository, containing some minimalistic example implementations.

How to install

npm (Javascript/Typescript)

Run the following command:

npm i @attini/cdk
Maven (Java)

Add the following to your pom.xml file:

<dependency>
    <groupId>io.attini.cdk</groupId>
    <artifactId>attini-cdk-lib</artifactId>
    <version>1.2.1</version>
</dependency>
PyPI(Python)

Run the following command:

pip install attini-cdk-lib

How to use

To use Attini you need both the Attini CLI installed on your local machine and the Attini framework installed in your AWS account. See the get started guide for installation instructions.

Start from the root of the folder/project containing the resources that should be deployed. First create a new folder that will contain the CDK project that will become the deployment plan. In the folder, create a new cdk project in the language you prefer.

mkdir deloyment-plan-proj
cd deloyment-plan-proj
cdk init --language typescript

Install the attini constructs in the new app.

npm i @attini/cdk

Update the deployment-plan-proj stack to extend "DeploymentPlanStack" instead of "Stack". This will add the transformation necessary for Attini to function. This is also the stack where you create your deployment plan (find some examples here). All Attini types are supported, for more information on the different types, please read the guides or documentation.

In order to create an Attini distribution (the package that will be deployed) you need to create an attini-config.yaml file containing some basic data, such as the distribution name and our package instructions.

For this example, it could look like this:

distributionName: typescript-cdk-demo
initDeployConfig:
  template: deployment-plan.yaml
  stackName: ${environment}-${distributionName}-deployment-plan

package:
  prePackage:
    commands:
      - cd deployment-plan-proj
      - npm install
      - cdk synth > ../deployment-plan.yaml

The package commands will synthesise the template. For more information about packing, see the package a distribution guide.

The distribution can then be packaged and the deployed. From the root of the project, execute:

attini deploy run .

For more information about deploying a distribution. See the deploy a distribution guide.

Resources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

attini-cdk-lib-1.4.1.tar.gz (283.4 kB view details)

Uploaded Source

Built Distribution

attini_cdk_lib-1.4.1-py3-none-any.whl (282.1 kB view details)

Uploaded Python 3

File details

Details for the file attini-cdk-lib-1.4.1.tar.gz.

File metadata

  • Download URL: attini-cdk-lib-1.4.1.tar.gz
  • Upload date:
  • Size: 283.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for attini-cdk-lib-1.4.1.tar.gz
Algorithm Hash digest
SHA256 294b5273f5ea11fadbe9fbb99e073ff0d9b3969f6dcfe9cba61be023af41d95d
MD5 eecad92aba4be116863efc4616e11d1d
BLAKE2b-256 89f9e423739d1a5d4349d25540f8fdc2af1ae9b3eb27e4a33ea2c92efde307df

See more details on using hashes here.

File details

Details for the file attini_cdk_lib-1.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for attini_cdk_lib-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 914c9a944f8a8e9dbdd9998262f5a2caeba551da3bf3cb74ec319b902fc85067
MD5 5fb5514022ed0366dff26e2a86e820d7
BLAKE2b-256 ed6ee85c7e7d47f7cfb40f01c40ccc03f4a12db40e0a2167306833d0c8436c70

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page