Altostra Docs

    ›Tutorials

    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

    Try Altostra without connecting cloud accounts

    Overview

    Developers who want to work with Altostra sometimes need to go through approvals and organizational procedures in order to connect their cloud accounts. To make it easier for them we created the Playground environment, which enables them to try Altostra even before any cloud account is connected.

    The Playground Environment simulates a real cloud environment for you to deploy projects without actually creating cloud resources.

    You can use Altostra's tools as you would regularly, with one major difference: Once you deploy your project to the Playground environment, instead of deploying your project directly to your cloud account, Altostra will pack the infrastructure configuration and function code files into a single file, available for download.

    You can then download and review these files, and also execute them manually on your cloud account if you wish.

    Let's see how it works.

    Things you'll need for this tutorial

    1. An Altostra Account (Don't have one yet? Just login here)
    2. Altostra CLI installed (npm i -g @altostra/cli or see docs)
    3. Altostra extension for Visual Studio Code (VSCode Marketplace or see docs)

    Create a new project

    We'll use one of Altostra's templates to create a basic project:

    1. In Visual Studio Code, open the directory in which you wish to create the project.
    2. Switch to the Altostra view
    3. Click "Initialize Project"
    4. In the Templates list, click simple-crud-service-nodejs

    generate-crud-project

    Now you've got the architecture of a basic Serverless CRUD application, with basic code implementation.

    crud-arch

    Deploy the Project

    Now that we have the project, first we push a new image:

    $ alto push v0.1
    

    An Image is basically your infrastructure and code before they've been adapted to a specific environment. An Image can be deployed to any environment. You can read more about Altostra images here.

    Since we haven't connected any cloud account, we'll use the Altostra's built-in Playground environment:

    $ alto deploy sampleDeployment:v0.1 --env Playground
    

    An Instance is the adaption of your image (code & infrastructure) to a specific environment - in this case, the Playground environment.

    Altostra Playground environment stores your instance and image files for you for a month. When you connect your account, your files will be stored permanently on your account.

    You can list all the currently stored versions of your project's instances with alto instances:

    $ alto instances
    

    list-instances

    Get your instance

    Let's download your instance file.

    You can open your project in the Altostra Web Console to see its details and to download the files generated by the deployment, or simply run

    # open the current project in the Altostra Web Console
    alto console
    

    on your terminal, which will take you directly to your project in the Altostra Web Console.

    On your project page, click the sampleDeployment instance, and click the download link at the edge of the line

    download-instance

    What's in the file?

    The zip file you've downloaded contains 3 files:

    .
    ├── package.zip
    ├── root.json
    └── LogShipping.json
    
    • package.zip is the zip file that contains your code and dependency modules packages
    • root.json is the CloudFormation template that you can deploy directly to CloudFormation.
    • LogShipping.json is an optional CloudFormation template you can use to connect all your Lambda's log groups to an external logging service (like Logz.io, for example). You can read more about this on our blog.
    ← Create a Simple API ProjectCI/CD with Altostra CLI and Github Actions →
    • Things you'll need for this tutorial
    • Create a new project
    • Deploy the Project
    • Get your instance
    • What's in the file?
    © 2021 Altostra, Inc.