Skip to main content

Deploying your project

Deploying your Application is an important part in the Project lifecycle. Learn how you deploy your Application on GitHub and manually.

Prerequisites

To complete this tutorial, you should be familiar with starting a new project and the concept of Docker.

What you'll build

You'll create a new release in your project and deploy the Application part via Docker.

You can deploy your Application with different methods based on your current Project setup:

Using GitHub

Step 1: Review the release pull request

Once you're happy with your changes in your Telestion Project, it's time to release a new version.

Head over to your GitHub repository that contains the Telestion Project and take a look in the pull request section.

Link to GitHub pull request sectionGitHub pull request section

As you can see, the release.yml GitHub workflow automatically created a pull request that is ready for your review.

Link to GitHub's pull request section containing the release pull requestGitHub's pull request section containing the release pull request

Open the pull request and review the changes.

Link to The overview page of the release pull requestThe overview page of the release pull request
Conventional Commits

The GitHub action can only detect your changes if you're using Conventional Commits in your repository.

It then bumps the project version based on Semantic Versioning.

If you satisfied with the changelog and the new project version, merge the pull request.

Link to The merge pull request button in the GitHub's pull request overviewThe merge pull request button in the GitHub's pull request overview
Set release version explicitly

You can overwrite the Semantic Versioning behavior by pushing a empty commit containing the version number:

git commit --allow-empty -m "chore: release 2.0.0" -m "Release-As: 2.0.0"
git push

This triggers the release.yml workflow and changes the release version to your preference.

The merge commit triggers the release.yml workflow again which in turn builds and pushes the application to the GitHub Container Registry.

Step 2: Access the setup archive

To run the Telestion Project on your production system, you need a setup archive.

Head to the latest release via the link on the project metadata.

Link to Metadata sidebar of the GitHub repositoryMetadata sidebar of the GitHub repository

And download the archive named <your-project-name>-<tag>.zip.

Link to GitHub's release page with the uploaded artifactsGitHub's release page with the uploaded artifacts

Go to the deployment section of this tutorial.

Deploy on your production system »#deploy-on-your-production-system

Manually

Step 1: Bump project version

Update the project version in the version.txt file which resides in the project root.

Next, open the console and commit the version bump:

git add version.txt
git commit -m "chore(main): release $(<version.txt)"
git tag -a "v$(<version.txt)" -m "release $(<version.txt)"
git push --follow-tags
Semantic Versioning

The deployment scripts and tools require that you use the Semantic Versioning release style in your project.

Conventional Commits

Before bumping, you may look at your commit history with:

git log --oneline "v$(<version.txt)..HEAD"

And decide based on Conventional Commits to which version you might bump.

Step 2: Build the Application

Before pushing the release image to docker, you need to build the Application part.

Open your IDE and select the assembleDist task in the distribution section of Gradle.

Or run the Gradle task in your console:

cd application
JAVA_HOME="<path-to-jdk16>" ./gradlew assembleDist
cd ..

Step 3: Build and push the Docker images

Now build and push the Docker images:

./scripts/push-docker-images.sh

The script asks if things are unclear or if it can't recognize anything automatically.

Docker Login

The deployment script uses the Docker CLI to push the images to specified Docker registry. You probably need to login before you can push the images.

Take a look at the Docker login reference on how you can login in the console.

Specify another registry

By default, the script pushes the images to the Docker Hub, the official Docker registry.

If you would like to push to a different registry instead, use the --docker-registry <registry-uri> flag to specify the Docker registry explicitly.

See the script help for more information:

./scripts/push-docker-images.sh --help

Step 4: Create the setup archive

Now, the Docker images are available on your preferred registry. You now need to create the setup archive you can then deploy on your production system.

Open the console and run the create setup script:

./scripts/create-setup.sh

The script asks if things are unclear or if it can't recognize them automatically.

It creates a setup archive and place it in the build folder which resides in the project root.

Deploy on your production system

Before running Telestion on your production system, you need a working Docker and docker-compose installation.

Install Docker »https://docs.docker.com/get-docker/Install docker-compose »https://docs.docker.com/compose/install/

You should received a copy of the setup archive of the Telestion Project you want to deploy.

Copy it to your production system and extract it via:

unzip my-telestion-project-v1.3.0.zip

Head into the folder which contains the docker-compose.yml and start Telestion:

docker-compose up -d
Editing the docker-compose.yml

The packaged docker-compose.yml is a copy of the application/docker-compose.prod.yml configuration file.

In this file you can define which Docker images run on your production system, which ports it exposes, etc.

This downloads and starts the required components to run Telestion.

If you want to stop Telestion, call:

docker-compose down

Next steps

Congratulations: You've just deployed your first Telestion Project.

You can configure the deployed Telestion Project with the configuration files in the conf folder beside the docker-compose.yml and restart it if you like.

You might also want to use a graphical interface to interact with the running application.

Take a look at the tutorials for the Web Client:

Client Tutorials »/client/tutorials/