You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* ADD: create pipeline and adjust app-config.yml
* UPD: change the needs paramater and comment out secrets
* UPD: change the docker login
* UPD: fix typo
* UPD: delete github provider
* UPD: TYPPPPPOOOO
* UPD: add region to cloud run
* UPD: add port and use correct pg host
* DEL: remove all references to Kubernetes, since this backstage instance will be hosted on google cloud run
* FIX: remove line from Dockerfile
* ADD: add the cloud sql connection
* DEL: remove last instances of Kubernetes
* FIX: change region to europe-west1 because dns mapping is not available for europe-west10
* FIX: add https:// to the url
* UPD: test CD workflow
* DEL: remove uncessary scripts
---------
Co-authored-by: AGiljanovic <[email protected]>
Copy file name to clipboardExpand all lines: README.md
-123Lines changed: 0 additions & 123 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,18 +36,10 @@ POSTGRES_PASSWORD="admin"
36
36
37
37
BASE_URL="http://localhost:7007"
38
38
39
-
GITHUB_CLIENT_ID="your-id"
40
-
GITHUB_CLIENT_SECRET="your-secret"
41
-
42
39
GOOGLE_CLIENT_ID= "google_client_id"
43
40
GOOGLE_CLIENT_SECRET= "google_client_secret"
44
41
45
42
GITHUB_TOKEN="your-token"
46
-
47
-
K8S_URL="k8s-url"
48
-
K8S_ACCOUNT_TOKEN="k8s-account-token"
49
-
K8S_CA_DATA="k8s-ca-data"
50
-
K8S_CA_FILE="k8s-ca-file"
51
43
```
52
44
53
45
<details>
@@ -62,10 +54,6 @@ All of the environment variables prefixed with POSTGRES_ should stay like they a
62
54
<br>
63
55
Keep it the same as it is right now, this is the url on which the application is running.
64
56
65
-
**`GITHUB_CLIENT`:**
66
-
<br>
67
-
These environment variables are to setup correct [authentication](https://backstage.io/docs/getting-started/configuration#setting-up-authentication). Please follow [these](#github-auth) steps.
68
-
69
57
**`GOOGLE_CLIENT`:**
70
58
<br>
71
59
These environment variables are to allow google login with your code.berlin email.
@@ -76,11 +64,6 @@ Use the link above and copy the client ID and secret.
76
64
<br>
77
65
This environment variable is to configure the [GitHub integration](https://backstage.io/docs/getting-started/configuration#setting-up-a-github-integration),
78
66
so that Backstage can interact with your GitHub account and for example create a repository for you. Please follow [these](#github-integration) steps for the setup.
79
-
80
-
**`K8S_URL`:**
81
-
<br>
82
-
These environment variables are to configure the [kubernetes plugin](https://backstage.io/docs/features/kubernetes/).
83
-
To setup you local minikube environment follow [these](#kubernetes) steps.
84
67
</details>
85
68
86
69
# Setup Essentials
@@ -130,7 +113,6 @@ then you can decide where you to run backstage:
130
113
131
114
1.[locally](#running-with-yarn-dev) with `yarn dev` (recommended for regular development due to short waiting time on changes)
132
115
2. inside of a [docker container](#running-with-docker-compose) (recommended only to test certain environments due to high waiting time because of high image build time (up to 5 mins))
133
-
3. inside of [minikube](#running-with-minikube) (only recommended to test to be the closest to the actual production environment (for testing))
134
116
<br>
135
117
!! Note this is based on assumption that we will host `Backstage` inside of the Kubernetes cluster where we host the other dev projects
136
118
@@ -175,107 +157,6 @@ To remove all containers (**IMPORTANT** this also removes the database container
175
157
yarn docker:remove-all
176
158
```
177
159
178
-
# Kubernetes
179
-
The following talks about two different topics (it is highly encourged to watch a short [tutorial](https://www.youtube.com/watch?v=PziYflu8cB8) on Kubernetes before continuing):
180
-
181
-
1. How to setup minikube and how to use Backstage to monitor pods that are running inside of Kubernetes.
182
-
2. How to run Backstage itself inside of the minikube cluster (and still be able to monitor the pods that are running in Kubernetes, which means the first step is a pre-requisite of this step).
183
-
The reason for having the second step is more for testing purposes because this setup is the closest to the actual production environment
184
-
185
-
> Note again here the second step is only true if we actually host Backstage in the same cluster as the other deployments
186
-
187
-
## Setup with `minikube`
188
-
Pre-requisite: Docker installed
189
-
190
-
To setup minikube and the [Kubernetes plugin](https://backstage.io/docs/features/kubernetes/) so that we can monitor Kubernetes pods
191
-
through Backstage we need to do the following:
192
-
1. Install `kubectl`
193
-
<br>
194
-
1.1 Install the correct version of `kubectl` depending on your operation system: [linux](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/),
195
-
[macOS](https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/) or [windows](https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/). On macOS installing with
196
-
homebrew is recommended by me.
197
-
<br>
198
-
1.2 Quick Note about `kubectl`: `kubectl` is the cli tool that can interact with an existing Kubernetes cluster and it has different `contexts` for different cluster.
199
-
If this is your first time installing `kubectl` and you most likely do not have a cluster that you are connected to at this point, we will set up a local cluster with `minikube`
200
-
in the following setup, and that will automatically set your context to the correct cluster (in this case `minikube`).
201
-
To see all your contexts run `kubectl config get-contexts`.
202
-
2. Install `minikube`
203
-
<br>
204
-
2.1 Follow [this guide](https://minikube.sigs.k8s.io/docs/start/#installation) to install minikube and also how to run minikube inside of a docker, make sure you install minikube for the correct system.
205
-
Installing on macOS with homebrew is recommended by me.
206
-
<br>
207
-
2.2 Start minikube clutser with `minikube start` (can take a few minutes)
208
-
<br>
209
-
NOTE: If you have installed kubectl, `minikube start` will automatically set your current context to the `minikube` context!
210
-
<br>
211
-
2.3 To test if the installation worked run: `kubectl get pods -A` and you should have an output similiar to this:
**3.1 Create a service account so that backstage can access the cluster**
226
-
```sh
227
-
kubectl apply -f minikube/clusterrolebinding.yaml
228
-
229
-
kubectl get secrets cluster-admin-secret -o jsonpath="{.data['token']}" | base64 --decode; echo
230
-
```
231
-
copy and paste that token in the K8S_ACCOUNT_TOKEN environment variable in your .env
232
-
<br>
233
-
<br>
234
-
**3.2 Get the certificate authority for minikube**
235
-
```sh
236
-
cat ~/.minikube/ca.crt | base64
237
-
```
238
-
copy and paste that certificate in the K8S_CA_DATA environment variable in your .env
239
-
<br>
240
-
<br>
241
-
**3.3 Get the URL that `minikube` is running on**
242
-
```sh
243
-
kubectl cluster-info
244
-
```
245
-
copy and paste the first URL in the K8S_URL environment variable in your .env
246
-
<br>
247
-
<br>
248
-
**3.4 Run pod in `minikube` to be inspected by `Backstage`**
249
-
```sh
250
-
kubectl apply -f minikube/test-deployment.yaml
251
-
```
252
-
253
-
> NOTE: we leave the K8S_CA_FILE environment variable empty for now because that is only needed if you run Backstage in the cluster,
254
-
for now it is recommended only to run it [locally](#running-with-yarn-dev) or run in [docker](#running-with-docker-compose) to be able to run it inside of minikube read [here](#running-with-minikube)
0 commit comments