This is guide is about how to create infrastructure for guard application from scratch. (Currently a lot of part is missing, and We will add them when needed)
- When you run terraform you also created firebase application and some of firebase configuration was stored in kubernetes secret
firebase-secret-terraform
. However in time we were doing this infrastrucute as a code, somethings were not possible to automate. Becouse of that you need do this steps manually. - Log to your firebase account and go to your firebase project. Then navigate in left menu to project settings. (Settings icon next to Project Overview).
- In the project settings navigate to Cloud Messaging section. At bottom on the screen is section Web configuration. Click on Generate key pair. Private and public key was genareted.
- Copy the public key value and use it in values when installing helm. Under section:
firebase:
vapidPublicKey: <Vapid public key placeholder>
- Then navigate to Project settings/Service Accounts
- Firebase Admin SDK should be selected. Click on the Generate new private key and download json with values.
- Supply your helm values with values from json file you downloaded.
firebase:
vapidPublicKey: <value placeholder>
projectId: <value placeholder>
privateKeyId: <value placeholder>
clientEmail: <value placeholder>
clientId: <value placeholder>
authUri: <value placeholder>
tokenUri: <value placeholder>
authProviderx509CertUrl: <value placeholder>
clientx509CertUrl: <value placeholder>
universe_domain: <value placeholder>
- When installing helm chart add those helm values
-
Install Open Lens. You can download it from here.
-
Install Aws CLI version 2. You can download it from here.
-
Open Solution in dev container
-
Configure AWS CLI. If you haven't done this before, you can do it by running the following command and following the prompts:
aws configure
If you dont have credentials ask your aws admin.
- Run this command
aws eks update-kubeconfig --region eu-central-1 --name sf-cluster-guard --role-arn your-arn-role --alias sf-cluster-guard
- Ensure that you are using right cluster.
kubectx
kubectx nameOfCluster # to switch cluster
- Go to guard folder. And run.
helm upgrade --install guard . --namespace guard