Exercise 7: Using a custom collection with Appsody

In this exercise, we will show how to add the custom collection to your Appsody cli and to create an example application. Hint, this is going to be a lot like one of the exercises from day 1, but this time with your custom collection.

When you have completed this exercise, you will understand how to

  • update Appsody CLI to point to a new collection

  • test out the custom stack in our custom collection

Tools used during Exercise 7

Prerequisites

You should have already carried out the prerequisites defined in Exercise 6.

Steps

1. Get the collection URL

Obtain the URL to the collection repository. If a Git release was created for the collections, generally, the URL format will be: https://<git repository>/<organization>/collections/releases/download/<release>/kabanero-index.yaml

In our workshop, it'll likely be:

https://github.com/<username>/collections/releases/download/0.2.1-custom/kabanero-index.yaml

  • Replace <username> with your Github username

2. Test the new stack and collection

Now that we know the URL, let's add the repo to our local appsody

Create a new directory to work in:

Initialize the appsody stack

You should see output similar to the following:

Run the stack:

You should see output similar to the following:

Test it out with curl and you'll see the helmet headers.

Use the appsody stop command in another terminal in the same directory to stop the running application.

3. Prepare the new application for deployment

Before you can deploy this application using the pipeline you will be building in the upcoming exercises, there needs to be a deployment file added to the application. The deployment file is called app-deploy.yaml. This file was created automatically for you in day 1 exercise 3 with the appsody deploy command.

It can also be created without deploying an application using the --generate-only flag. Run this command:

After the command completes, check the contents of the application directory with ls

Congratulations!! We've got a published custom stack and it can be used for local development.

Last updated

Was this helpful?