Deployment introduction

Now it’s time to get our own instance of Backstage running. We will use a mix of automated and manual steps for this.

We will follow a simplified version of the steps recommended in the Backstage documentation. As we go through this, you may want to follow along with the Backstage guide, which may clarify the tools and other pre-requisites you need for deployment.

We start with installing locally on your own PC or server. We'll check that we have the necessary tools and the right versions of them.

Backstage is built on Node.js, and there is an NPX utility to install the backstage application.

This installation connects to SQL Lite, which is an in memory database. So while this gets us going, we need a database that is persistent, that retains the data when the database is switched off or restarted.

So we will install a PostgreSQL database, then update the connection parameters for Backstage to use this.

Next we will show how to use GitHub for authentication by creating a GitHub OAuth app, generating a Client ID and Client Secret. We will also create a GitHub Personal Access Token.

Because these configuration parameters are sensitive, we will want to protect them, and avoid publishing them in our GitHub repository.

We will do this by storing the variables in a .env file, ensuring that git does not track them. We will also need different values for other parameters when we deploy to the cloud, so we will store these in the .env file also.

Next we will install the TechDocs plugin so we can activate this feature.


Once you have Backstage running locally, you will want to make it accessible to others.

If you have a small team, and are planning to use your Backstage development environment on premise, you may want to simply install Backstage on a Linux server that other members of your team can access.

It’s important at this stage to have a working instance of Backstage that you and your colleagues can access so that you can familiarise yourselves with the layout and features, and demonstrate how it can streamline your workflow.

We will then create a Docker image that can be deployed to any environment, whether on-premise, AWS or another cloud provider. Creating the Docker image is also explained well in the Backstage documentation https://backstage.io/docs/deployment/.

To deploy to AWS, we next need to set up our AWS environment. We will walk through deploying to both a single EC2 instance, and a Kubernetes cluster using the AWS Elastic Container Service (ECS).


So let's get to it.


Rating
0 0

There are no comments for now.