Source Code Deployment

Lens AppIQ supports deploying applications from source code.

Lens AppIQ uses Cloud Native Buildpacks to deploy applications from source code. You can use a specific builder (default heroku/buildpacks:20) with deploy --builder flag. You can also provide one or more build packs using the --build-packs flag.

Cloud-native Buildpacks can be used to deploy many languages and frameworks, e.g., go, ruby, python, dotnet, java, nodejs, PHP, etc.

You can search the Cloud-native build packs registry to find which buildpacks to use:

Follow the instructions below to deploy a sample python application from source code:



You can deploy application to a target namespace in a cluster. To do this you should create an environment, for details see: Managing Environments

Deploy Application from source

You can clone the Python sample app from the following repository:

git clone [email protected]:shipa-corp/python-sample.git && cd python-sample
lapps app deploy -a python-sample --environment [NAME] -t shipa-team . -i $YOUR_DOCKER_REGISTRY/python-sample:1.0 --shipa-yaml ./shipa.yml

The following steps are performed during the deployment of the source code:

  • Buildpack builder (default heroku/buildpacks:20), auto-detects which buildpack to use (in this case it uses python pack) and it also uses Procfile from the root of the app directory
  • It builds a docker image and publishes it to the provided image URL $YOUR_DOCKER_REGISTRY/python-sample:1.0. This image is used to perform the deployment.
  • The Python app listens on port 5000. We use the shipa.yaml file to define the target port and setup ingress so ingress traffic can reach the application.
| Application | Status    | Shipa Managed | Address                                                                                                     |
|python-sample| 1 running | true          |    |


--builder and --build-packs option

Lens AppIQ uses heroku/buildpacks:20 by default during the build phase when deploying from source, it auto-detects language and framework to build and create docker image and it also publishes it to the image registry URL specified with -i option.

You can use --build-packs to specify a specific pack or in cases where you want to use your own pack. you can specify more than one pack by separating them by a comma.


Private Registry

You can pass the --private-image flag in the UI and input the user/token interactively to authenticate or export two environmental variables.

export LAPPS_REGISTRY_USERNAME="arn:aws:iam::123456789:user/bacon"
export LAPPS_REGISTRY_PASSWORD="abcdefg#/abcdefg#/"
lapps app deploy -a python-sample . -i * --shipa-yaml ./shipa.yml --private-image