Skip to content

Ri1a/altdeploy-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

145 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AltDeploy CLI

AltDeploy CLI is a command-line interface for managing provisioning and deployments to various platforms.

AltDeploy-overview.png

Contents

Further documentation can be found in the doc directory:

User Guide

Here is a quick guide to get you started with AltDeploy CLI.

Installation

Installation of AltDeploy CLI requires Pulumi to be installed on your system.

You can install AltDeploy CLI by building it from source.

Or from the Binary distributions available on the releases page (Not implemented yet).

Usage

To use AltDeploy CLI, you need a configuration file and can then run the following command:

altdeploy [COMMAND] [FLAGS]

# Example:
altdeploy up --config=altdeploy.yml --state-store=file://app/data

To run from source use: go run main.go [COMMAND] [FLAGS]

Commands

  • preview: Validates and shows the application configuration and deployment plan without actually deploying it.
  • up: Deploys an application.
  • output: Outputs the connection strings from the deployed resources.
  • destroy: Destroys the deployed application.
  • dump: Dumps the full configuration of the application.
  • help: Display help information for commands.

Configuration File

The configuration file is a YAML file that defines the application, its resources and the providers used for deployment. The file is typically named altdeploy.yml and should be placed in the root directory of your project.

Example configuration file:

providers:
  my-docker-local: # Custom identifier for the provider
    type: docker                  # Local Docker provider

resources:
  my-container: # Custom identifier for the resource
    type: container                    # Type of resource
    provider: my-docker-local          # Reference to the provider
    image: stefanprodan/podinfo:latest # Docker image to use
    replicas: 1                        # Number of replicas for the container
    ports: # Ports to expose
      - "9898:9898"                    # Port mapping for the container FROM:TO
    environment: # Environment variables for the container
      - ENV=int                        # VARIABLE=VALUE

Details about the configuration file structure and options can be found in the Configuration Documentation.

Secrets

All sensitive values required in the configuration file should be managed securely as environment variables or defined in a .env file. The CLI will automatically load these variables and interpolate them into the configuration at runtime.

Secrets should be referenced within the configuration file using the following syntax:

    clientSecret: ${AZURE_CLIENT_SECRET}

More details about the secrets management can be found in the Pulumi secrets Documentation.

State

AltDeploy uses the pulumi state to keep track of the deployed resources and their configurations. There are three options for managing the state:

  • Local State: The state is stored in local files.
  • Remote State: The state is stored in a remote backend, such as an S3 bucket.
  • (Not implemented yet) Managed State: The state is managed by Pulumi Cloud, which provides a web interface for managing the state.

The state can be configured as a flag when running the CLI commands:

altdeploy [COMMAND] --state-store=[s3://<bucket>...|file://app/data]

More details about the state management can be found in the Pulumi state Documentation.

Development Setup

Prerequisites

Before you start, make sure you have the following installed:

Install dependencies

go mod tidy

Start the application

go run main.go [COMMAND] [FLAGS]

See documentation for available commands and flags:

go run main.go --help

About

AltDeploy CLI - Manage provisioning and deployments for various platforms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages