Merge pull request #4888 from roffe/docs-1

removed sed from command to get AMI images
This commit is contained in:
k8s-ci-robot 2018-04-03 07:40:09 -07:00 committed by GitHub
commit 0d0c86a6bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -54,15 +54,15 @@ Some things to note from here:
CoreOS webpage includes a "json" with the updated list of latest images: [https://coreos.com/dist/aws/aws-stable.json](https://coreos.com/dist/aws/aws-stable.json) CoreOS webpage includes a "json" with the updated list of latest images: [https://coreos.com/dist/aws/aws-stable.json](https://coreos.com/dist/aws/aws-stable.json)
By using "jq" you can obtain the "ami" for a specific region (change the region "-" for "_" in the following command): By using "jq" you can obtain the "ami" for a specific region
```bash ```bash
curl -s https://coreos.com/dist/aws/aws-stable.json|sed -r 's/-/_/g'|jq '.us_east_1.hvm'|sed -r 's/_/-/g' curl -s https://coreos.com/dist/aws/aws-stable.json | jq -r '.["us-east-1"].hvm'
"ami-32705b49" "ami-32705b49"
``` ```
The last command will check the all "hvm" CoreOS images on us-east-1 region (us_east_1 for our command). Please, always use "hvm" images. The last command will check the all "hvm" CoreOS images on us-east-1 region. Please, always use "hvm" images.
At the moment we created this document, our ami was: "ami-32705b49". More info about the image can be obtained by using the following "aws-cli" command: At the moment we created this document, our ami was: "ami-32705b49". More info about the image can be obtained by using the following "aws-cli" command:

View File

@ -102,7 +102,7 @@ CoreOS has been tested enough to be considered ready for production with kops, b
The following steps are known: The following steps are known:
* The latest stable CoreOS AMI can be found using: * The latest stable CoreOS AMI can be found using:
``` ```bash
aws ec2 describe-images --region=us-east-1 --owner=595879546273 \ aws ec2 describe-images --region=us-east-1 --owner=595879546273 \
--filters "Name=virtualization-type,Values=hvm" "Name=name,Values=CoreOS-stable*" \ --filters "Name=virtualization-type,Values=hvm" "Name=name,Values=CoreOS-stable*" \
--query 'sort_by(Images,&CreationDate)[-1].{id:ImageLocation}' --query 'sort_by(Images,&CreationDate)[-1].{id:ImageLocation}'
@ -110,8 +110,8 @@ aws ec2 describe-images --region=us-east-1 --owner=595879546273 \
Also, you can obtain the "AMI ID" from CoreOS web page too. They publish their AMI's using a json file at [https://coreos.com/dist/aws/aws-stable.json](https://coreos.com/dist/aws/aws-stable.json). Using some scripting and a "json" parser (like jq) you can obtain the AMI ID from a specific availability zone: Also, you can obtain the "AMI ID" from CoreOS web page too. They publish their AMI's using a json file at [https://coreos.com/dist/aws/aws-stable.json](https://coreos.com/dist/aws/aws-stable.json). Using some scripting and a "json" parser (like jq) you can obtain the AMI ID from a specific availability zone:
``` ```bash
curl -s https://coreos.com/dist/aws/aws-stable.json|sed -r 's/-/_/g'|jq '.us_east_1.hvm'|sed -r 's/_/-/g' curl -s https://coreos.com/dist/aws/aws-stable.json | jq -r '.["us-east-1"].hvm'
"ami-32705b49" "ami-32705b49"
``` ```