Skip to content

Commit

Permalink
Merge pull request #4888 from roffe/docs-1
Browse files Browse the repository at this point in the history
removed sed from command to get AMI images
  • Loading branch information
k8s-ci-robot authored Apr 3, 2018
2 parents 0757961 + a4b58e2 commit 0d0c86a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/examples/coreos-kops-tests-multimaster.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

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
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"
```

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:

Expand Down Expand Up @@ -304,4 +304,4 @@ After a brief time, your cluster will be fully deleted on AWS and you'll see the
Deleted cluster: "coreosbasedkopscluster.k8s.local"
```

**NOTE:** Before destroying the cluster, "really ensure" any extra security group "not created" directly by KOPS has been removed by you. Otherwise, KOPS will be unable to delete the cluster.
**NOTE:** Before destroying the cluster, "really ensure" any extra security group "not created" directly by KOPS has been removed by you. Otherwise, KOPS will be unable to delete the cluster.
6 changes: 3 additions & 3 deletions docs/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ CoreOS has been tested enough to be considered ready for production with kops, b
The following steps are known:

* The latest stable CoreOS AMI can be found using:
```
```bash
aws ec2 describe-images --region=us-east-1 --owner=595879546273 \
--filters "Name=virtualization-type,Values=hvm" "Name=name,Values=CoreOS-stable*" \
--query 'sort_by(Images,&CreationDate)[-1].{id:ImageLocation}'
```

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:

```
curl -s https://coreos.com/dist/aws/aws-stable.json|sed -r 's/-/_/g'|jq '.us_east_1.hvm'|sed -r 's/_/-/g'
```bash
curl -s https://coreos.com/dist/aws/aws-stable.json | jq -r '.["us-east-1"].hvm'
"ami-32705b49"
```

Expand Down

0 comments on commit 0d0c86a

Please sign in to comment.