Step 3: Upload a sample application to your GitHub repository (original) (raw)
In this step, you will copy a sample revision from a public Amazon S3 bucket to your GitHub repository. (For simplicity, the sample revisions provided for this tutorial are single web pages.)
Topics
- Push a sample revision from a local Linux, macOS, or Unix machine
- Push a sample revision from a local Windows machine
Push a sample revision from a local Linux, macOS, or Unix machine
With your terminal still open in, for example, the/tmp/CodeDeployGitHubDemo
location, run the following commands one at a time:
Note
If you plan to deploy to a Windows Server instance, substituteSampleApp_Windows.zip
for SampleApp_Linux.zip
in the commands.
(Amazon S3 copy command)
unzip SampleApp_Linux.zip
rm SampleApp_Linux.zip
git add .
git commit -m "Added sample app"
git push
Where (Amazon S3 copy command)
is one of the following:
aws s3 cp s3://aws-codedeploy-us-east-2/samples/latest/SampleApp_Linux.zip . --region us-east-2
for the US East (Ohio) regionaws s3 cp s3://aws-codedeploy-us-east-1/samples/latest/SampleApp_Linux.zip . --region us-east-1
for the US East (N. Virginia) regionaws s3 cp s3://aws-codedeploy-us-west-1/samples/latest/SampleApp_Linux.zip . --region us-west-1
for the US West (N. California) Regionaws s3 cp s3://aws-codedeploy-us-west-2/samples/latest/SampleApp_Linux.zip . --region us-west-2
for the US West (Oregon) regionaws s3 cp s3://aws-codedeploy-ca-central-1/samples/latest/SampleApp_Linux.zip . --region ca-central-1
for the Canada (Central) Regionaws s3 cp s3://aws-codedeploy-eu-west-1/samples/latest/SampleApp_Linux.zip . --region eu-west-1
for the Europe (Ireland) regionaws s3 cp s3://aws-codedeploy-eu-west-2/samples/latest/SampleApp_Linux.zip . --region eu-west-2
for the Europe (London) regionaws s3 cp s3://aws-codedeploy-eu-west-3/samples/latest/SampleApp_Linux.zip . --region eu-west-3
for the Europe (Paris) regionaws s3 cp s3://aws-codedeploy-eu-central-1/samples/latest/SampleApp_Linux.zip . --region eu-central-1
for the Europe (Frankfurt) Regionaws s3 cp s3://aws-codedeploy-il-central-1/samples/latest/SampleApp_Linux.zip . --region il-central-1
for the Israel (Tel Aviv) Regionaws s3 cp s3://aws-codedeploy-ap-east-1/samples/latest/SampleApp_Linux.zip . --region ap-east-1
for the Asia Pacific (Hong Kong) regionaws s3 cp s3://aws-codedeploy-ap-northeast-1/samples/latest/SampleApp_Linux.zip . --region ap-northeast-1
for the Asia Pacific (Tokyo) regionaws s3 cp s3://aws-codedeploy-ap-northeast-2/samples/latest/SampleApp_Linux.zip . --region ap-northeast-2
for the Asia Pacific (Seoul) regionaws s3 cp s3://aws-codedeploy-ap-southeast-1/samples/latest/SampleApp_Linux.zip . --region ap-southeast-1
for the Asia Pacific (Singapore) Regionaws s3 cp s3://aws-codedeploy-ap-southeast-2/samples/latest/SampleApp_Linux.zip . --region ap-southeast-2
for the Asia Pacific (Sydney) regionaws s3 cp s3://aws-codedeploy-ap-southeast-4/samples/latest/SampleApp_Linux.zip . --region ap-southeast-4
for the Asia Pacific (Melbourne) regionaws s3 cp s3://aws-codedeploy-ap-south-1/samples/latest/SampleApp_Linux.zip . --region ap-south-1
for the Asia Pacific (Mumbai) regionaws s3 cp s3://aws-codedeploy-sa-east-1/samples/latest/SampleApp_Linux.zip . --region sa-east-1
for the South America (São Paulo) Region
Push a sample revision from a local Windows machine
With your command prompt still open in, for example, thec:\temp\CodeDeployGitHubDemo
location , run the following commands one at a time:
Note
If you plan to deploy to an Amazon Linux or RHEL instance, substituteSampleApp_Linux.zip
for SampleApp_Windows.zip
in the commands.
(Amazon S3 copy command)
Unzip the contents of the
the ZIP file directly into the local directory (for example c:\temp\CodeDeployGitHubDemo
), not into a new subdirectory.
git add .
git commit -m "Added sample app"
git push
Where (Amazon S3 copy command)
is one of the following:
aws s3 cp s3://aws-codedeploy-us-east-2/samples/latest/SampleApp_Windows.zip . --region us-east-2
for the US East (Ohio) regionaws s3 cp s3://aws-codedeploy-us-east-1/samples/latest/SampleApp_Windows.zip . --region us-east-1
for the US East (N. Virginia) regionaws s3 cp s3://aws-codedeploy-us-west-1/samples/latest/SampleApp_Windows.zip . --region us-west-1
for the US West (N. California) Regionaws s3 cp s3://aws-codedeploy-us-west-2/samples/latest/SampleApp_Windows.zip . --region us-west-2
for the US West (Oregon) regionaws s3 cp s3://aws-codedeploy-ca-central-1/samples/latest/SampleApp_Windows.zip . --region ca-central-1
for the Canada (Central) Regionaws s3 cp s3://aws-codedeploy-eu-west-1/samples/latest/SampleApp_Windows.zip . --region eu-west-1
for the Europe (Ireland) regionaws s3 cp s3://aws-codedeploy-eu-west-2/samples/latest/SampleApp_Windows.zip . --region eu-west-2
for the Europe (London) regionaws s3 cp s3://aws-codedeploy-eu-west-3/samples/latest/SampleApp_Windows.zip . --region eu-west-3
for the Europe (Paris) regionaws s3 cp s3://aws-codedeploy-eu-central-1/samples/latest/SampleApp_Windows.zip . --region eu-central-1
for the Europe (Frankfurt) Regionaws s3 cp s3://aws-codedeploy-il-central-1/samples/latest/SampleApp_Windows.zip . --region il-central-1
for the Israel (Tel Aviv) Regionaws s3 cp s3://aws-codedeploy-ap-east-1/samples/latest/SampleApp_Windows.zip . --region ap-east-1
for the Asia Pacific (Hong Kong) regionaws s3 cp s3://aws-codedeploy-ap-northeast-1/samples/latest/SampleApp_Windows.zip . --region ap-northeast-1
for the Asia Pacific (Tokyo) regionaws s3 cp s3://aws-codedeploy-ap-northeast-2/samples/latest/SampleApp_Windows.zip . --region ap-northeast-2
for the Asia Pacific (Seoul) regionaws s3 cp s3://aws-codedeploy-ap-southeast-1/samples/latest/SampleApp_Windows.zip . --region ap-southeast-1
for the Asia Pacific (Singapore) Regionaws s3 cp s3://aws-codedeploy-ap-southeast-2/samples/latest/SampleApp_Windows.zip . --region ap-southeast-2
for the Asia Pacific (Sydney) regionaws s3 cp s3://aws-codedeploy-ap-southeast-4/samples/latest/SampleApp_Windows.zip . --region ap-southeast-4
for the Asia Pacific (Melbourne) regionaws s3 cp s3://aws-codedeploy-ap-south-1/samples/latest/SampleApp_Windows.zip . --region ap-south-1
for the Asia Pacific (Mumbai) regionaws s3 cp s3://aws-codedeploy-sa-east-1/samples/latest/SampleApp_Windows.zip . --region sa-east-1
for the South America (São Paulo) Region
To push your own revision to an Ubuntu Server instance, copy your revision into your local repo, and then call the following:
git add .
git commit -m "Added Ubuntu app"
git push