# App Mesh Controller Development Guide ## Prerequisites * [Go 1.13+](https://golang.org/) * [Docker](https://www.docker.com/) * [Make](https://man7.org/linux/man-pages/man1/make.1.html) * [jq](https://stedolan.github.io/jq/) ## Building the Controller The controller Docker image can be built via: ```bash AWS_REGION= AWS_ACCOUNT= make docker-build ``` This command will compile the controller, run unit tests, and generate a Docker image using the ECR repository format (e.g. `.dkr.ecr..amazonaws.com/amazon/appmesh-controller`). The image can be pushed to your local ECR repository via: ```bash AWS_REGION= AWS_ACCOUNT= make docker-push ``` Once the image has been pushed, you can run the following to install the controller and CRDs to your configured cluster (defined in `~/.kube/config`): ```bash AWS_REGION= AWS_ACCOUNT= make deploy ``` ## Building for App Mesh Preview **Important**: The preview version of the controller will not work against App Mesh's production environment (and vice versa). App Mesh's endpoint and signing name are chosen during the build process. When working against the App Mesh Preview environment, the preview SDK models are downloaded and used to generate the AWS SDK for Go dynamically. The steps for building and deploying the controller are the same as above, but with two new variables for the `docker-build` step. ```bash AWS_REGION= AWS_ACCOUNT= APPMESH_SDK_OVERRIDE=y APPMESH_PREVIEW=y make docker-build ```