# 1.3. Deploy TeraFlowSDN over MicroK8s This section describes how to deploy TeraFlowSDN controller on top of MicroK8s using the environment configured in the previous sections. ## 1.3.1. Install prerequisites ```bash sudo apt-get install -y git curl jq ``` ## 1.3.2. Clone the Git repository of the TeraFlowSDN controller Clone from ETSI-hosted GitLab code repository: ```bash mkdir ~/tfs-ctrl git clone https://labs.etsi.org/rep/tfs/controller.git ~/tfs-ctrl ``` __Important__: Original H2020-TeraFlow project hosted on GitLab.com has been archieved and will not receive further contributions/updates. Please, clone from ETSI-hosted GitLab code repository. ## 1.3.3. Checkout the appropriate Git branch By default 'master' branch is checked out. If you want to deploy 'develop' that incorporates the most up-to-date code contributions and features, run the following command: ```bash cd ~/tfs-ctrl git checkout develop ``` __Important__: During the elaboration and validation of the tutorials, you should checkout branch "feat/microk8s-deployment". Otherwise, you will not have important files such as "my_deploy.sh" or "deploy.sh". As soon as the tutorials are completed and approved, we will remove this note and merge the "feat/microk8s-deployment" into "develop" and later into "master", and then the previous step will be effective. ## 1.3.4. Prepare a deployment script with the deployment settings Create a new deployment script, e.g., `my_deploy.sh`, adding the appropriate settings as follows. This script, by default, makes use of the private Docker registry enabled in MicroK8s, as specified in `TFS_REGISTRY_IMAGE`. It builds the Docker images for the subset of components defined in `TFS_COMPONENTS`, tags them with the tag defined in `TFS_IMAGE_TAG`, deploys them in the namespace defined in `TFS_K8S_NAMESPACE`, and (optionally) deploys the extra Kubernetes manifests listed in `TFS_EXTRA_MANIFESTS`. Besides, it lets you specify in `TFS_GRAFANA_PASSWORD` the password to be set for the Grafana `admin` user. ```bash cd ~/tfs-ctrl tee my_deploy.sh >/dev/null <