AltDeploy CLI is a command-line interface for managing provisioning and deployments to various platforms.
Further documentation can be found in the doc directory:
Here is a quick guide to get you started with AltDeploy CLI.
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).
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/dataTo run from source use: go run main.go [COMMAND] [FLAGS]
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.
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=VALUEDetails about the configuration file structure and options can be found in the Configuration Documentation.
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.
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.
Before you start, make sure you have the following installed:
go mod tidygo run main.go [COMMAND] [FLAGS]See documentation for available commands and flags:
go run main.go --help