No results

Help CenterGetting StartedSetting Up Your Environment

Setting Up Your Environment

Last updated October 22, 2024

Setting up your environment is the first crucial step in leveraging Spacelift’s powerful infrastructure automation capabilities. By ensuring that your environment is configured correctly, you can take full advantage of Spacelift's features to streamline your DevOps processes. This guide will walk you through the necessary steps to get your environment ready for integration with Spacelift.

Step-by-Step Guide

  1. Create a Spacelift Account
  • Visit the  Spacelift website .
  • Click on the "Sign Up" button in the top right corner.
  • Fill out the required information to create your account.
  1. Choose Your Preferred Cloud Provider
  • Log in to your Spacelift dashboard.
  • Navigate to the "Settings" tab.
  • Select your preferred cloud provider from the available options (e.g., AWS, GCP, Azure).
  • Follow the prompts to authenticate and link your cloud provider account.
  1. Install Required Tools
  • Ensure you have the necessary command-line tools installed on your local machine:
  • Terraform: Download and install Terraform from the official website.
  • Git: Download and install Git from the  official website .
  • Spacelift CLI: Follow the instructions in the Spacelift documentation to install the Spacelift CLI.
  1. Configure Your Environment
  • Open your terminal.
  • Set up your environment variables by creating a .env file in your project directory. Include the following: makefile Copy code SPACELIFT_TOKEN=<your_spacelift_api_token>
  • Replace <your_spacelift_api_token> with your actual API token, which can be found in your Spacelift account settings.
  1. Connect Your Git Repository
  • Go to the Spacelift dashboard and select "New Stack."
  • Choose your connected Git provider (e.g., GitHub, GitLab).
  • Authorize Spacelift to access your repositories.
  • Select the repository you want to connect to and click "Next."
  1. Define Your Stack Configuration
  • In the stack setup wizard, specify the following:
  • Stack Name: Give your stack a descriptive name.
  • Workspace: Choose the workspace associated with your stack.
  • Branch: Select the branch to track for changes.
  • Click "Create Stack" to finalize your setup.
  1. Test Your Setup
  • Make a small change in your connected Git repository and push the changes.
  • Monitor the Spacelift dashboard for a new plan run to ensure everything is working as expected.
  1. Explore Spacelift Features
  • Familiarize yourself with Spacelift’s features, such as policy enforcement, automated deployments, and integrations.
  • Refer to the Spacelift documentation for additional resources and best practices.

By following these steps, you’ll be well on your way to setting up your environment for successful infrastructure automation with Spacelift. If you encounter any issues, consult the Spacelift support team or the community forums for assistance.

Was this article helpful?