- The Azure CLI version 2.0.46 or later.
az --version
to check installed version. - The
kubectl
binary version 1.10+ .kubectl version
to check installed version.
- Make
az login
if needed - Create a resource group
az group create --name onprem-aks-rg --location centralus
- Get available Kubernetes versions
az aks get-versions --location centralus -otable
- Create AKS cluster
az aks create --resource-group onprem-aks-rg --name onprem-aks --kubernetes-version 1.11.3 --node-count 1 --node-vm-size Standard_DS2_v2 --node-osdisk-size 128 --enable-addons monitoring --admin-username ubuntu --ssh-key-value <path_to_ssh_public_key>
- Get and configure kubernetes cluster credentials
az aks get-credentials --resource-group onprem-aks-rg --name onprem-aks --admin
- Check out your current context
kubectl config current-context
-
Define your CF app URL: example
https://onprem-aks.codefresh.io
-
Register CF application on git provider side. The procedure is described in this document
-
Write down Client ID, Client Secret, git provider URL.
- Clone onprem repository
git clone [email protected]:codefresh-io/onprem.git
cd onprem
-
Download values.yaml and sa.json files from 1Password into current
./onprem
directory. When logged in search foronprem
indevops-shared
vault. -
Make configuration changes in
sa-dec.json
,values.yaml
files.
sa.json
contains GCP service account that enables a customer to pull codefresh images (created in GCP codefres-enterprise project )values.yaml
set CF application domain name, git provider domain name, secrets such asgithubClientID
,githubClientSecret
, orgitlabClientID
,gitlabClientSecret
etc.
- Give a node
local-volume
label
kubectl get node
kubectl label nodes <NODENAME> provisioner=local-volume
- Run
cf-onprem
script
sudo ./cf-onprem
To run the script in non-interactive mode use -y|--yes
argument:
sudo ./cf-onprem -y
- Wait for CF App to be deployed
watch kubectl -ncodefresh get pods
- Get ingress service ip address
kubectl -ncodefresh get svc | grep ingress-controller
- Register CF application URL with ip addrees at Cloudflare.com (or other domain name registrar)
- Open web browser and go to the CF application URL (ex. https://onprem-aks.codefresh.io)
- Log in with
ON PREMISE CODEFRESH
credentials. - Go to
Admin Management --> IDPs
. - Edit your git provider with git provider domain name and then Log Out.
- Wait for several minutes and Sign up with chosen git provider.
- Go to
Integrations --> Git --> Congifure --> ADD GIT PROVIDER
and configure it. Git providers document can help. - Log in with
ON PREMISE CODEFRESH
credentials once again, Go toAdmin Management --> Users
and addAdmin
role for your user if needed. Go toAdmin Management --> Nodes
and ensure cfapi is up and has running status. If not it is needed to restart cfapi pod
kubectl -ncodefresh get pod | grep cfapi
kubectl -ncodefresh delete pod <cfapi-pod-name>
- Sign in with your git provider.
- Add Repository.
18.Click
BUILD
- Uncomment webTLS keys in values.yaml.
- Define custom TLS certificate and private key location and put them there.
- Run
cf-onprem
script with parameters:
sudo ./cf-onprem --web-tls-key <path-to-private-key-file> --web-tls-cert <path-to-full-certificate-chain-file>