# RFDK Sample Application - EC2 Image Builder - Python ## Overview [Back to overview](../README.md) ## Instructions --- **NOTE** These instructions assume that your working directory is `examples/deadline/EC2-Image-Builder/python/` relative to the root of the AWS-RFDK package. --- 1. This sample app on the `mainline` branch may contain features that have not yet been officially released, and may not be available in the `aws-rfdk` package installed through pip from PyPI. To work from an example of the latest release, please switch to the `release` branch. If you would like to try out unreleased features, you can stay on `mainline` and follow the instructions for building, packing, and installing the `aws-rfdk` from your local repository. 2. Install the dependencies of the sample app: ```bash pip install -r requirements.txt ``` 3. If working on the `release` branch, this step can be skipped. If working on `mainline`, navigate to the base directory where the build and packaging scripts are, then run them and install the result over top of the `aws-rfdk` version that was installed in the previous step: ```bash # Navigate to the root directory of the RFDK repository pushd ../../../.. ./build.sh # Enter the Docker container to run the pack scripts ./scripts/rfdk_build_environment.sh ./pack.sh # Exit the Docker container exit # Navigate back to the example directory popd pip install ../../../../dist/python/aws-rfdk-.tar.gz ``` 4. By downloading or using the Deadline software, you agree to the [AWS Customer Agreement](https://aws.amazon.com/agreement/) and [AWS Intellectual Property License](https://aws.amazon.com/legal/aws-ip-license-terms/). You acknowledge that Deadline is AWS Content as defined in those Agreements. To accept these terms, change the value of `accept_aws_customer_agreement_and_ip_license` in `package/config.py`: ```py self.accept_aws_customer_agreement_and_ip_license: AwsCustomerAgreementAndIpLicenseAcceptance = AwsCustomerAgreementAndIpLicenseAcceptance.USER_REJECTS_AWS_CUSTOMER_AGREEMENT_AND_IP_LICENSE ``` 5. Change the value of the `deadline_version` variable in `package/config.py` to specify the desired version of Deadline to be deployed to your render farm. RFDK is compatible with Deadline versions 10.1.9.x and later. To see the available versions of Deadline, consult the [Deadline release notes](https://docs.thinkboxsoftware.com/products/deadline/10.2/1_User%20Manual/manual/release-notes.html). It is recommended to use the latest version of Deadline available when building your farm, but to pin this version when the farm is ready for production use. For example, to pin to the `10.1.13` release of Deadline, use `10.1.13.2`. 6. Also in `package/config.py`, you can set the version of your image recipe that you'll create by changing the value of `image_recipe_version`. The default value here should be fine to start. The image recipe version would only need to be changed if you're changing any inputs for the image creation that will cause a new image to be made. 7. Deploy all the stacks in the sample app: ```bash cdk deploy "*" ``` 8. Once you are finished with the sample app, you can tear it down by running: ```bash cdk destroy "*" ```