Deployment with Walhall

Overview

Walhall provides a simple interface for deploying containerized apps to Kubernetes. The apps consist of code repositories linked from your GitHub organization. Once you import them into Walhall, you can add them to your apps as modules.

By default, Walhall lets you deploy to a Google Cloud Platform (GCP) cluster managed by the platform itself. However, you can also deploy to your own cluster on GCP or Amazon Web Services (AWS).

This page explains the process of deploying an app with Walhall.

How do I deploy an app?

When you create an app, the platform will create a deployment environment and take you to the overview screen. It contains the modules you selected during the creation process.

Screenshot: Deployment environment

You must create a deployment draft in order to start configuring your modules. A deployment draft is a set of changes to the environment that is scheduled to be deployed.

  1. Click the Create Draft button to the right of the modules list.
    Screenshot: Create Draft button
  2. Apply any configuration changes to your modules that you want to deploy. You can configure a module by clicking on it in the list of modules.
  3. Choose the cluster you want to deploy your app to. The options are:
  4. Click the Deploy to Development button where the Create Draft button used to be.
  5. A modal will appear with a list of changes to be deployed. Click the Deploy button.

What happens when I deploy an app?

When you click “deploy,” Walhall does the following:

  1. Retrieves Docker images for each version of each module from its own registry.
  2. Creates a cluster (unless you are deploying to your own on GCP or AWS).
  3. Creates a namespace, database, and database user for each module.
  4. Creates/updates secrets and config maps for each module.
  5. Creates deployment controllers and pods, and then assigns a cluster IP, ingress, and DNS entries for each module.

If you exposed your modules with public IP addresses, then these addresses will appear after the app has been deployed. You can also see these URLs by clicking on the modules.

To make further changes and re-deploy your app, you must click Create Draft. Then, when you click the Deploy button, you will be able to preview the changes in a diff modal.

Requirements for deploying your modules

In order for a module to be deployable via Walhall, its repository must include the following:

  1. Dockerfile
  2. Drone file: Each module repository must have a Drone file (.drone.yml) in its root. Here is a basic Drone file you can add to your repository:
    # .drone.yml - Sample file for connecting your module to Walhall's CI/CD pipeline. 
    # Save this in the repository root. You don't have to change anything.
    # All environment variables are created in Walhall as secrets.
    
    pipeline:
    # Walhall requires git tags to exactly match the image tags. 
    # This step preserves the tags.
      preserve-git-tags:
        image: bash
        commands:
          # If the commit reference is a tag, then Drone will write the tag to the .tags file
          - bash -c "[[ \"${DRONE_COMMIT_REF}\" == \"refs/tags/\"* ]] && echo \"${DRONE_COMMIT_REF#refs/tags/}\" > .tags"
        when:
          event: [tag]
    
      # This step builds the module's Docker image and pushes it to the registry when a tag is pushed.
      # Drone is configured to use the Walhall registry by default.
      build-docker-image-tag:
        image: plugins/docker
        registry:
          from_secret: DOCKER_REGISTRY
        repo:
          from_secret: DOCKER_REPO
        username:
          from_secret: DOCKER_USERNAME
        password:
          from_secret: DOCKER_PASSWORD
        insecure: true
        file: Dockerfile
        when:
          event: [tag]
          status: [success]
  3. A tagged commit that includes the Dockerfile and the .drone.yml file.

Deployment failed?

If your deployment failed, then take a look at our troubleshooting page.

Free trial limitations

The following limitations apply to the free trial of the Humanitec platform:

  • Both user access management and source code management are handled through GitHub.
  • You may create no more than 20 apps, with no more than 3 environments each.
    • If you deploy your app to a cluster managed by Humanitec, then each deployed module will have a lifespan of 1 day.
  • You may only create development environments with the free trial.
  • The free trial does not include the role-based access control model. Each member of an organization in Walhall has full access to all applications for that organization and can delete and edit environments and applications.
  • Your app must implement Walhall’s CI/CD pipeline, i.e., using a Drone file.
  • For ingress, all deployed modules must use the *.newapp.io certificate.