Reference Navigation Down arrow

VM DASHBOARD

DOCKER
ACCOUNTS
USERS
APPLICATIONS
APP GROUPS
ENVIRONMENTS
RELEASES
DEPLOYMENTS
BUILDS
SERVERS
WORKFLOWS
INTEGRATIONS
NOTIFICATIONS
GROUPS
PIPELINES
DASHBOARDS

Creating and Building an Application


To build and deploy your code, you create applications in your Distelli account. Once you have created an application, you can build and deploy it.

You can also build your application as a Docker image, and upload it to your Docker Hub account. Once your application is built, you can run your application as a Docker container. For background information on Docker images, see the Docker Documentation.

Prerequisites

  • Your code is stored in one of the repositories Distelli supports.
  • Distelli supported software repos
  • If you want to build your application as a Docker file, you must have:
    • An account to one of the Docker registries Distelli supports. Distelli supported docker repos

      To create a free docker registry account, visit Docker Hub.

    • A Dockerfile that contains the commands to build your Docker image. Add the Dockerfile to your code repository. For steps to build a Dockerfile, see the Docker Dockerfile.

If your code isn’t stored in a repository, see Creating an Application without a Repository.

To create and build an application

  1. Login to your Distelli account.
  2. Ensure you are on the Applications Overview page.
  3. App Overview
  4. On the top right, click New App. The New Application page opens.
  5. Choose Source Control
  6. If you have not connected your source control to Distelli, it will say Connect. If you have already connected your source control, it will say Use. Choose Source Control

    If you are connecting your source control, for the first time, you may be redirected to your provider's website, and prompted to allow Distelli to access your repositories. Once you have granted access, you are returned to the New Application page, and the button for your source control provider will say Use now.

  7. Click the Use button for your source control provider. A list of repositories you have access to is shown.
  8. Choose Repository

    You can search for repositories. In the example above, the search is for "node".

  9. Click the repository that contains your code. You are prompted to select branches that you want to add.
  10. Choose Branches
  11. Depending on the branches that you want to add to Distelli, do one of the following:
    • If you want to add specific branch(es); ensure Specific Branches is selected and select (click) the branch(es) you wish to select.
    • If you want to dynamically add branches that match a regular expression pattern; for example:
      release/.*
      Will add all branches with the prefix release/
      To use regex and dynamically learn branches, click Matching Regular Expression, and enter the regular expression.
  12. When you have finished selecting branch(es), click I'm Done. The configure build steps will appear.
  13. Build with Docker

    Next, you are prompted to configure your build steps. To continue you must either:

    • Build with Docker - If building with docker, Distelli will build a docker image and push this to a docker registry. For more information on using this option, continue to Build with Docker.
      Note: Building with docker, can also create a Distelli release.
    • Build Distelli Release - If building Distelli release, Distelli will build a release, from your build artifacts, and store the release for deployments. For more information on using this option, continue to Build Distelli Release.

    Build with Docker

    In the Configure build steps section, you will enter your Application build steps that must be built before building your docker image. An example might be:

    echo "--Sourcing nvm--"
    source ~/.nvm/nvm.sh
    
    echo "--Installing NodeJS 4.4.7--"
    nvm install v4.4.7
    
    echo "--Installing latest npm globally--"
    npm install npm -g
    
    echo "--Installing NodeJS Packages--"
    npm install
    
    echo "--Running Tests--"
    npm test
    

    Providing debug statements, like echo, can be helpful to troubleshoot failed builds.

    You do not need to add your docker build commands. Distelli will add these when you specify your docker registry.

  14. Enter your application build steps in the provided Build - Steps to build and test your application, if, any build steps are required. Otherwise, it is safe to leave blank.
  15. Select which docker registry you wish to use.
  16. If you are connecting your docker registry, for the first time, you will be required to enter the following information, depending on which registry you are connecting to:

    • Docker Hub & Docker Private Registry
      • Email - The email used with this docker registry.
      • Username - The username user with this docker registry.
      • Password - The password associated with the username for this docker registry.
      • Endpoint - The docker registry endpoint. For example:
    • AWS ECR Container Registry
      • Key Name - The AWS IAM name with permissions to ECR.
      • Access Key - The AWS Access key associated with the IAM role above.
      • Secret Key - The AWS Secret associated with the Access key above.
      • For more info, see Managing AWS Access Keys and AWS ECR IAM Roles.
    • Google Container Registry
  17. Enter the Repository Name.
  18. Different docker registries represent repositories differently.

    • Docker Hub & Docker Private Registry
      • REGISTRY_USERNAME/REPOSITORY_NAME
    • AWS ECR Container Registry
    • Google Container Registry
      • gcr.io/PROJECT_NAME/DOCKER_IMAGE
  19. After Connecting your Repository your build steps should include the docker build instructions.
  20. Distelli build steps
  21. Click I'm Done and then skip ahead to Review Your Build Configuration.
  22. Build Distelli Release

    If you completed the above steps Build with Docker, skip ahead to Review Your Build Configuration. Otherwise, you are building a Distelli release. Continue here.

    In the Configure build steps section, you will enter your Application build steps. An example might be:

    echo "--Sourcing nvm--"
    source ~/.nvm/nvm.sh
    
    echo "--Installing NodeJS 4.4.7--"
    nvm install v4.4.7
    
    echo "--Installing latest npm globally--"
    npm install npm -g
    
    echo "--Installing NodeJS Packages--"
    npm install
    
    echo "--Running Tests--"
    npm test
    

    Providing debug statements, like echo, can be helpful to troubleshoot failed builds.

  23. Enter your application build steps in the provided Build - Steps to build and test your application, if, any build steps are required.
  24. In the PkgInclude - Specify which artifacts from the build to bundle into a release section, enter an * (asterisk).
    An asterisk tells Distelli to package up all files after the build. For now this will do, but if you'd like to specify specific files, see the documentation for PkgInclude.
  25. Distelli build steps
  26. Click I'm Done.

Review your Build Configuration

Review your build configuration

In the review your build configuration dialog, you can:

  1. Change the App Name of the application in Distelli.
  2. Set the Distelli shared Build Image to build within.
  3. Set whether you want this application to Auto Build on repository commits.

When you are ready, click Looks good, Start Build!.

Product Documentation

Product Documentation