npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cloud-provisioning-toolkit

v1.2.4

Published

![cloud-provisioning-toolkit Logo ](./cloud-provisioning-toolkit.png)

Downloads

43

Readme

cloud-provisioning-toolkit Logo

cloud-provisioning-toolkit

Cloud Provisioning Toolkit (CPT) is an open-source CLI tool built on Node.js designed to streamline the process of setting up infrastructure and CI/CD pipelines for web development projects. With CPT, developers can effortlessly bootstrap infrastructure resources on various cloud platforms and generate CI/CD pipelines to deploy their code seamlessly.

Key Features

1. Multiple Environments Provisioning

Provision both permanent environments like "prod" and "staging," as well as temporary environments for each merge request. The CLI follows the GitHub flow branching strategy, facilitating the development and deployment to multiple environments seamlessly.

2. Multi-Cloud Support

Our CLI offers diverse cloud solutions, with a primary focus on containerized applications. It caters to cloud platforms such as AWS and GCP, including support for Kubernetes and other services that facilitate Docker deployments.

3. Infrastructure as Code Integration

The CLI harnesses the power of Infrastructure as Code (IaC) tools. Currently, Pulumi is the supported IaC tool, but the CLI is designed to be extensible, making integration with other IaC tools straightforward.

4. Pipeline CI/CD

Generate a complete CI/CD pipeline that streamlines the integration and deployment of developer applications on the underlying infrastructure. Presently, the CLI leverages GitLab CI as the platform for these pipelines.

5. Supported Development Technologies

The CLI supports a broad spectrum of development technologies, including those around the Node.js runtime such as React, Angular, Node.js, and Nest.js. Additionally, it caters to technologies behind Java, encompassing Java and Spring Boot.

What CPT Generates

After running the CPT CLI, it generates the following configuration files:

Cloud-provisioning-toolkit overview

  1. Infrastructure Configuration: The CLI generates an infra directory containing your infrastructure configuration with Pulumi. Inside this directory, you'll find two files:

    • pulumi.yaml: Defines your infrastructure.
    • pulumi.*.yaml: Specifies the configuration for your environment.
  2. CI/CD Pipeline Configuration: The CLI creates a .gitlab-ci.yaml file that defines your CI/CD pipeline.

  3. Kubernetes Deployment (Optional): If you choose Kubernetes as your deployment service, CPT generates a k8s directory. Inside this directory, you'll find three manifest files:

    • deployment.yaml
    • service.yaml
    • ingress.yaml

These files streamline the provisioning of your cloud infrastructure, set up CI/CD pipelines, and, if needed, provide Kubernetes configurations.

With the infra folder for infrastructure and the .gitlab-ci.yaml file along with the k8s directory for Kubernetes deployments, CPT offers a comprehensive solution to kickstart your development project.

Prerequisites

Before using the CLI, make sure you have the following prerequisites installed and configured on your system:

Installation

Use the package manager npm to install cloud-provisioning-toolkit globally in your local system.

npm install -g cloud-provisioning-toolkit

Usage

Quickstart with CPT

CPT Quickstart

To get started with the Cloud Provisioning Toolkit (CPT), follow these steps:

  1. Initialize Your Project:

    To initiate your project, use the init command of the CPT CLI. You can optionally pass configuration parameters for your project, such as the project name and the cloud provider. If you skip these parameters, the CLI will prompt you for the necessary and required information.

cloud-provisioning-toolkit init [--name <value>] [--cloud <GCP|AWS>]
[--stack <value>] [--location <value>] [--gcp-project <value>]

#To get the help panel of the package
cloud-provisioning-toolkit --help

#To get the help panel of the init command
cloud-provisioning-toolkit init --help
  1. Choose Services to Provision:

After initialization, you'll be prompted to choose the services you want to provision. Enter the required configuration parameters for each service.

  1. Select Deployment Service:

Once you've chosen the services to provision, the CLI will prompt you to select the deployment service for your application.

  1. Generate Configuration Files:

After making your choices, the CLI will generate files in the root source directory, typically including an infra directory that contains your infrastructure configuration with Pulumi and a .gitlab-ci.yml file that defines your CI/CD pipeline.

  1. Provision Infrastructure:

Navigate to the infra directory and run the pulumi up command to provision your infrastructure.

  cd infra
  pulumi up

Ensure that the operation succeeds, and your infrastructure is provisioned successfully.

  1. Commit and Push Code:

Finally, commit and push your code to GitLab to trigger the pipeline, which will deploy your application on the underlying infrastructure.

Now, your project is set up and ready for development and deployment with CPT. Enjoy streamlined infrastructure provisioning and CI/CD automation!

Here are an overview about the supported solutions on AWS and its configuration parameters followed by an example for each entry paramater :

Amazon Elastic Kubernetes Service (EKS) - Fargate mode:

  • Cluster name : EKS cluster name (new-eks)
  • Application name: Kubernetes deployment name (new-app)
  • Container port : application's container port to map (3000)
  • Domain name : the domain name to map for your environments, and the routing rule is based on the hostname

Amazon Elastic Container Service (ECS) - Fargate mode :

  • Application name : ECS's service name (new-service)
  • Container port : application's container port to map (80)
  • Desired count of replicas : number of replicas for your production service (3)

Amazon Simple Service Storge (S3) Bucket:

  • Bucket name : desired bucket name (new-bucket)
  • Location : bucket's location (eu-west-3)
  • Main page suffix : your html main page name (index.html)
  • Error page suffix : your html error page name (error.html | 404.html)
  • Build folder : build folder name (dist | build)

Here are an overview about the supported solutions on GCP and its configuration parameters followed by an example for each entry parameter :

Google Kubernetes Engine (GKE) - Autopilot mode:

  • Cluster name : GKE cluster name (new-cluster)
  • Application name : Kubernetes deployement name (new-app)
  • Container port : application's container port to map (3000)
  • Cluster location : desired cluster's location (europe-west9)
  • Domain name : the domain name to map for your environments, and the routing rule is based on the hostname

Google Kubernetes Engine (GKE) - Standard mode:

  • Cluster name : GKE cluster name (new-cluster)
  • Application name : Kubernetes deployement name (new-app)
  • Container port : application's container port to map (3000)
  • Cluster location : desired cluster's location (europe-west9)
  • Nodes number : desired number of nodes to provision for the cluster (3)
  • Node machine type: desired machine type of the nodes (e2)
  • Domain name : the domain name to map for your environments, and the routing rule is based on the hostname

CloudRun:

  • Service name : Cloudrun service name (new-service)
  • Location : desired service's location (europe-west9)

Google Storage Bucket :

  • Bucket name : desired bucket name (new-bucket)
  • Location : bucket's location (europe-west9)
  • Main page suffix : your html main page name (index.html)
  • Error page suffix : your html error page name (error.html | 404.html)
  • Build folder : build folder name (dist | build)

Contributing

We welcome contributions to [CPT]! Before you get started, please review our Contribution Guidelines.

Credits

Logo created by DesignEvo logo maker

License

[CPT] is licensed under the MIT License.