Altostra Docs

    ›Working with projects

    Getting Started

    • Welcome to Altostra
    • Connect your accounts
    • Install the developer tools
    • Log in from the CLI

    Tutorials

    • Create a Static Website
    • Create a Scalable Webhook
    • Create a Simple API Project
    • Try Altostra without connecting cloud accounts
    • CI/CD with Altostra CLI and Github Actions

    How To

      Working with projects

      • Create a new project
      • Deploy a project
      • Manage a project

      Working with environments

      • Manage an environment
      • Configure instances expiration for an environment

      Working with the Editor

      • Grant access to vendor services
      • Use the Parameter Store
      • Use a custom CloudFormation resource
      • Attach a custom policy to a Function
      • Connect a Function to VPC
      • Add filter policy to SNS subscription

      Organization account settings

      • Set General Settings
      • Connect a Git account
      • Connect Cloud Accounts
      • Manage log aggregation accounts

    CLI

    • Altostra CLI
    • Commands

      • templates
      • new
      • init
      • push
      • deploy
      • sls-deploy
      • sync
      • invalidate
      • domains
      • console
      • environments
      • images
      • instances
      • build
      • config
      • import
      • projects
      • tasks
      • activity-log
      • login
      • logout
      • account
      • whoami
      • api-key
      • docs

      Options

      • --debug
      • --verbose
      • Scripting options
    • Configuration files

    Errors And Solutions

    • Autnentication Required

    Technical Reference

    • Environments
    • Playground Environment
    • Instances
    • Project image
    • Image Repository
    • Log Shipping
    • Deployment Modes
    • Altostra Cloud Integration

    Integrations

      CI/CD

      • CircleCI

    Deploy a project

    Deployments in Altostra work in two phases:

    1. First, you publish an image of your project.
    2. Then, you either create or update an instance from that image.

    When you create an image of a project, Altostra bundles the project together with the project's files and pushes the image to the Altostra image repository on your account. You can then deploy that image to an environment of your choice.

    For more information about project images, read the Project Image reference guide.

    Before you begin

    To create project images you must first clone the project Git repository to your local development environment and login using the Altostra CLI.

    Create a project image

    To create a project image, use the push command:

    1. In your local development environment open a terminal and switch to your project directory.
    2. Run any build process if your project requires it.
    3. In the terminal, run:
    $ alto push v1.0
    

    "v1.0" is just a name we use in this example, you can use any string you want, such as "my-image" or "testing-123".

    When you run the command, the CLI automatically creates an Altostra project for you if there isn't one; if there is, it pushes the image to that project.

    Deploy using Altostra CLI

    List the available images

    To view the available images for a project, use the images command:

    $ alto images
    ┌─────────┬────────────┬──────────────────────────┐
    │ (index) │    Name    │      Last Modified       │
    ├─────────┼────────────┼──────────────────────────┤
    │    0    │  'v0.9'    │ '4/29/2020, 2:18:27 PM'  │
    │    1    │  'v1.0'    │ '5/24/2020, 9:48:47 PM'  │
    └─────────┴────────────┴──────────────────────────┘
    

    Create a new instance

    When you create a new instance, you essentially create a new "stack" or "instance" of your project, which is then updated with newer versions of your projects.

    To create a new instance for the current project using the image v1.0 that we created, use the deploy command:

    $ alto deploy prod:v1.0 --env Development
    

    This command creates a new instance named "prod", or updates if it already exists, from the project image by the name "v1.0" in the "Development" environment.

    Update an existing instance

    When you update an existing instance, you push changes that alter that instance instead of creating more resources. Instances are bound to environments when they are created, you must create another instance in a different environment if you wish to relocate an instance.

    To update an existing instance for the current project using the image v1.0, use the deploy, this time the --env switch not needed and is ignored:

    $ alto deploy prod:v1.0
    

    This updates the instance named "prod" with the project image by the name "v1.0".

    After deploying

    If the deployment mode for your organization is set to manual, then you need to follow the URL returned by the Altostra CLI deploy command to finish the deployment, for more information read about deployment modes. However, if the deployment mode is set to automatic, then the deployment starts immediately and you don't need to perform any additional steps.

    List instances

    To list the instances for the current project, use the instances command:

    $ alto instances
    ┌─────────┬────────┬─────────────────────────┬─────────────────┬─────────────────┬────────────┐
    │ (index) │  Name  │         Updated         │   Environment   │      Image      │   Status   │
    ├─────────┼────────┼─────────────────────────┼─────────────────┼─────────────────┼────────────┤
    │    0    │ 'dev1' │ '5/22/2020, 1:29:41 PM' │  'Development'  │ 'NOT_AVAILABLE' │  'Failed'  │
    │    1    │ 'dev2' │ '5/24/2020, 9:48:50 PM' │  'Development'  │     'v1.2'      │ 'Deployed' │
    │    2    │ 'prod' │ '6/12/2020, 2:22:52 PM' │  'Production'   │     'v1.1'      │ 'Deployed' │
    └─────────┴────────┴─────────────────────────┴─────────────────┴─────────────────┴────────────┘
    

    List instance details

    To list the details for a specific instance, use the instances command followed by the instance name:

    $ alto instances prod
    
    History of instance prod:
    
    ┌─────────┬───────────────┬───────────────────────────┬───────────────────────────┬──────────────────┐
    │ (index) │      User     │           Date            │           Image           │      Status      │
    ├─────────┼───────────────┼───────────────────────────┼───────────────────────────┼──────────────────┤
    │    0    │    'Daniel'   │  '7/1/2020, 11:06:52 PM'  │          'v1.1'           │    'Deploying'   │
    │    1    │   'Samantha'  │  '6/30/2020, 11:40:10 AM' │          'v1.0'           │    'Deployed'    │
    │    2    │     'Jack'    │  '6/15/2020, 8:19:25 PM'  │         'v0.1.5'          │ 'RollbackFailed' │
    │    3    │     'Jack'    │  '6/14/2020, 3:53:06 PM'  │         'v0.1.5'          │    'Deployed'    │
    │    4    │   'Samantha'  │  '6/12/2020, 1:27:23 PM'  │          'v0.1'           │    'Deployed'    │
    └─────────┴───────────────┴───────────────────────────┴───────────────────────────┴──────────────────┘
    

    Deploy using the Web Console

    To deploy a project from the Web Console you must already have at least one image available for that project. Please refer to the Create a project image section above. To begin, login to the Altostra Web Console.

    Create an instance

    When you create an instance, you essentially create a "stack" or "instance" of your project, which you can then update with newer versions of that project.

    To create a new instance:

    1. Head over to Projects in the top menu.
    2. Click the project that you wish to deploy.
    3. On the Instances page, click Deploy.
    4. Select New Instance.
    5. Enter a name for the instance.
    6. Select the Image to use for the instance.
    7. Select the Environment to which you wish to deploy.
    8. Click Deploy to begin the deployment.

    Update an existing instance

    When you update an existing instance, you push changes that alter that instance instead of creating additional resources.

    Instances are bound to environments when they are created, therefore, you cannot change the environment for an existing instance. If you wish to relocate an instance, you must create another instance in a different environment.

    There are two main ways to update an instance in the Web Console:

    1. From a project page

    1. Head over to the Project page to which the instance belongs.
    2. Click on Deploy in the Instances page of a project.
    3. Select Existing Instance.
    4. Select the Instance to update.
    5. Select the Image to use for the instance.
    6. Click Deploy to begin the deployment.

    2. From an instance page

    1. Head over to the Instance page.
    2. Click on Deploy.
    3. Select the Image to use for the instance.
    4. Click Deploy to begin the deployment.
    ← Create a new projectManage a project →
    • Before you begin
    • Create a project image
    • Deploy using Altostra CLI
      • List the available images
      • Create a new instance
      • Update an existing instance
      • After deploying
      • List instances
      • List instance details
    • Deploy using the Web Console
      • Create an instance
      • Update an existing instance
    © 2021 Altostra, Inc.