Welcome to the repository for deploying Kratix on AKS.
These manifests are designed to be used alongside the video demo and related docs.
These docs assume:
- You have the
az
CLI installed and are currently logged in - You have created a Azure Git Repo you want Kratix to write to
Given these manifests require permissions to both your Azure Cloud Platform (Azure) account, you will need the following environment variables set:
DIR_EXAMPLES
AZURE_SERVICE_PRINCIPAL_ID
AZURE_SERVICE_PRINCIPAL_KEY_PATH
AZURE_TENANT_ID
GIT_REPO_URL
GIT_REPO_USER
GIT_REPO_TOKEN
Defaults which may work for you are:
export DIR_EXAMPLES=$(pwd)
For the GIT_REPO_URL
, GIT_REPO_USER
and GIT_REPO_TOKEN
environment variables, you can create a new Git repo in Azure
Devops and create
a Personal Access Token to access it
For the AZURE_SERVICE_PRINCIPAL_ID
, AZURE_SERVICE_PRINCIPAL_KEY_PATH
and
AZURE_TENANT_ID
environment variables, you can create a new service principal
in the Azure
portal
and give it permissions to provision SQL instances.
There are a number of manifests that require updating with the environment variable values.
Some of this data is sensitive. For that reason, the files have been added to
.gitignore
. You should not include these if you push your changes to a remote repository.
mkdir -p ${DIR_EXAMPLES}/secrets && rm ${DIR_EXAMPLES}/secrets/**
sed \
-e s/AZURE_SERVICE_PRINCIPAL_ID/$(echo -n $AZURE_SERVICE_PRINCIPAL_ID | base64)/ \
-e s/AZURE_SERVICE_PRINCIPAL_KEY/$(cat ${AZURE_SERVICE_PRINCIPAL_KEY_PATH} | base64 )/ \
-e s/AZURE_TENANT_ID/$(echo $AZURE_TENANT_ID | base64)/ \
${DIR_EXAMPLES}/secrets.template/promise-secret.yaml > ${DIR_EXAMPLES}/secrets/promise-secret.yaml
sed \
-e "s/GIT_REPO_USER/$GIT_REPO_USER/" \
-e "s/GIT_REPO_TOKEN/$GIT_REPO_TOKEN/" \
${DIR_EXAMPLES}/secrets.template/gitrepository-secret.yaml > ${DIR_EXAMPLES}/secrets/gitrepository-secret.yaml
sed \
-e "s/GIT_REPO_USER/$GIT_REPO_USER/" \
-e "s/GIT_REPO_TOKEN/$GIT_REPO_TOKEN/" \
${DIR_EXAMPLES}/secrets.template/gitstatestore-secret.yaml > ${DIR_EXAMPLES}/secrets/gitstatestore-secret.yaml
sed \
-e "s^GIT_REPO_URL^$GIT_REPO_URL^" \
${DIR_EXAMPLES}/secrets.template/gitrepository.yaml > ${DIR_EXAMPLES}/secrets/gitrepository.yaml
sed \
-e "s^GIT_REPO_URL^$GIT_REPO_URL^" \
${DIR_EXAMPLES}/secrets.template/gitstatestore.yaml > ${DIR_EXAMPLES}/secrets/gitstatestore.yaml