This provisions an EKS cluster with CPU Management Policies confiured to static.
The instance type in the node group is m5.metal.
$ # Provision EKS ClusterThis provisions an EKS cluster with CPU Management Policies confiured to static.
The instance type in the node group is m5.metal.
$ # Provision EKS ClusterThis assumes that we have a CoPilot app called test-app and both a test & prod environment configured.
Start by uploading environment variables for our application's environments
$ # Test Param
$ aws ssm put-parameter \| FROM python:3-onbuild | |
| EXPOSE 8000 | |
| CMD ["./server.py"] |
| #!/usr/bin/env bash | |
| # | |
| # Prevent access to the metadata endpoint from docker containers in Amazon Linux and Amazon Linux 2 | |
| # | |
| printf "Creating /bin/update-iptables.sh" | |
| cat <<EOF | tee /bin/update-iptables.sh | |
| #!/usr/bin/env bash |
| /* | |
| * This Java source file was generated by the Gradle 'init' task. | |
| */ | |
| package app; | |
| import java.util.List; | |
| import software.amazon.awssdk.services.s3.model.Bucket; | |
| import software.amazon.awssdk.services.s3.S3Client; | |
| import software.amazon.awssdk.services.sts.StsClient; | |
| import software.amazon.awssdk.services.sts.model.GetCallerIdentityResponse; |
| # Copyright 2019 Amazon Web Services | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |