Build Settings

Introduction

From the Build Settings screen you can edit various aspects related to the image builder, such as the infrastructure on which the builder should run, its cluster, allocated resources and registries where application images should be stored.

Build Settings can be accessed in two ways:

  • From the Project Settings screen. In this case, Build Settings will be automatically copied into all new environments within the project.

  • From the Environment Settings screen. In this case, Build Settings will be available only for the current environment.

1. Click on the project name in the upper-right corner of the Bunnyshell interface.

2. Select View all projects.

3. Click the Settings button of the project where you want to edit the settings.

4. From the left side menu, select Build Settings.

Build Settings

Builder Infrastructure

Choose where the Image Builder will run.

  • Managed Builder: Run the Image Builder in a cluster managed by Bunnyshell. This involves less configuration, but it comes with less resources.

circle-info

The default resources are 2 CPUs and 6GB of RAM.

  • Self-Hosted Builder: Run the Image Builder on one of clusters. This allows you to allocate as many resources as you want. However, you will have to configure your Builder Cluster.

  • Project Build Settings (only available at the environment level): Use the Build Settings available at the project level.

Select Builder Cluster

circle-info

Only available if you opted for a Self-Hosted Builder.

To connect a Builder Cluster to Bunnyshell, you need to create a StorageClass in Kubernetes with the name bns-builder-sc. We use this policy to make sure of the following:

  • The reclaimPolicy property is set to delete;

  • Auto-provisioning of volumes is enabled - Private Volume (PV) from Private Volume Claim (PVC).

circle-info

By default, the build commands are executed in the current working directory. Bunnyshell considers the working directory to be the one where the docker-compose file is located.

Creating a Storage Class

To create a class you can use kubectl and follow the instructions below:

1. Create a spec.yaml file with the following contents

2. Establish a connection with your cluster.

3. Perform the operation below:

kubectl apply -f spec.yaml

circle-info

To make sure the operation was successful, perform the following operation:

kubectl describe storageclass bns-builder-sc

Alternatively, you can follow these instructions to create the storage class:

chevron-rightPrivate Kubernetes Clusterhashtag

Define the StorageClass using the content below:

You can find additional information regarding Storage Classes on the official Kubernetes documentation platformarrow-up-right.

chevron-rightMicrosoft Azurehashtag

Define the StorageClass using the content below:

Additional information regarding StorageClasses is available on the Azure docs websitearrow-up-right.

chevron-rightAmazon Web Serviceshashtag

Define the StorageClass using the content below:

Read more about StorageClasses on the AWS documentation website herearrow-up-right.

chevron-rightGoogle Cloud Platformhashtag

Define the StorageClass using the content below:

You can find out more about Storage Classes on the Google Cloud documentation websitearrow-up-right.

chevron-rightDigitalOceanhashtag

To add a Storage Class in DigitalOcean, follow the steps detailed below:

1. Log in to your DigitalOcean account and select a cluster.

2. Click Kubernetes Dashboard.

3. On the left side menu, scroll to the Config and Storage category and click Storage Classes.

4. Click the Create new resource button in the upper-right corner of the main interface.

5. Input the content below, then click Upload.

Builder Resources

circle-info

Only available if you opted for a Self-Hosted Builder.

Choose what resources will be allocated to your Builder Cluster. You can edit the number of CPUs and the amount of RAM.

Container Registry

Select the container registry where your application images will be stored. Choose between one of your personal registries or the standard Bunnyshell registry.

Last updated

Was this helpful?