The First Step

Congratulations on installing Astra! Now, let's dive into setting up your infrastructure.

Astra’s init command offers an interactive, step-by-step guided experience to set up your infrastructure from scratch. We’ll start by creating a dedicated directory for your Terraform files and then initiate Astra's setup process.

1. Create a Terraform Directory

Open your terminal and create a new directory where Astra will store your infrastructure Terraform files:

mkdir ~/Code/terraform
cd ~/Code/terraform

2. To Infinity!

Now, initialize Astra by running the following command:

astra init

Astra will prompt you for the API key discussed earlier. Enter your key, and Astra will create a configuration file at ~/.astra.toml. This file stores your API key and other settings for the Astra CLI.

That's it! You can just follow the on-screen instructions from here. Astra will start the bootstrap process right after helping you set up your config file.

Key Points to Remember

  • Astra sets up everything using Terraform and the AWS CLI, no need to configure them once installed Astra will handle that.
  • Once you complete the astra init process, you'll have your generated Terraform code. Treat this code like any software project: use version control practices, and consider checking it into a private GitHub repository. When updates are needed, follow standard practices like using pull requests.

What you'll have after a successful bootstrap

Astra's bootstrapping process is comprehensive! Once you're done with it, your infrastructure will be all set up to handle anything you throw at it.

Here is a list of things Astra gets set up for you via the init command:

  • Multi-Account Strategy: Creates production, staging, and development accounts. Separating your workload types for better security and organization.
  • Single Sign On: Sets up AWS SSO, initial roles, users, and permissions. Enabling you to sign into any of the above accounts easily and securely.
  • Terraform: Everything Astra creates is output into Terraform. Allowing you to further configure your environment using best IaC practices.
  • Networking: VPCs, subnets, security groups, route tables, and more! Astra gives you all the networking configuration you need for now and the future.
  • DNS: Allows you to connect your pre-purchased domain such that Astra can automatically create dns entries and it can be managed via Terraform.
  • Container Architecture: Just like Kubernetes, Astra sets you up with a container orchestrator that enables easy scaling, zero downtime deployments, and general ease of management for your business logic applications.

You can view a more in-depth explanation of all the goodies Astra includes here.

Need Help?

  • If you require assistance during any step of the bootstrapping process, Astra support is ready to help.
  • Explore more Astra commands by running astra --help for a complete list.