mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 09:39:08 +00:00
docs: Add basic docs for AWS support
Signed-off-by: Dave Tucker <dt@docker.com>
This commit is contained in:
parent
719f260e01
commit
8f4408310d
44
docs/aws.md
Normal file
44
docs/aws.md
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# Using LinuxKit on Amazon Web Services (AWS)
|
||||||
|
|
||||||
|
This is a quick guide to run LinuxKit on AWS.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
Before you proceed it's recommended that you set up the [AWS CLI](https://aws.amazon.com/cli/)
|
||||||
|
and perform an `aws configure`
|
||||||
|
|
||||||
|
If you do not wish to install these tools you should ensure that you set the AWS [environment variables](http://docs.aws.amazon.com/cli/latest/userguide/cli-environment.html)
|
||||||
|
|
||||||
|
You will need to create an Amazon S3 Storage Bucket for your LinuxKit images and create a VM Import Service Role.
|
||||||
|
Instructions on how to do this can be found [here](http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#w2ab1c10c15b7).
|
||||||
|
|
||||||
|
Finally, you must set the `AWS_REGION` environment variable as this is used by the AWS Go SDK.
|
||||||
|
```
|
||||||
|
export AWS_REGION=eu-west-1
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build an image
|
||||||
|
|
||||||
|
AWS requires a `RAW` image. To create one:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ moby build -output img examples/aws.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
## Push image
|
||||||
|
|
||||||
|
Do `linuxkit push aws -bucket bucketname aws.img` to upload it to the
|
||||||
|
specified bucket, and create a bootable image from the stored image.
|
||||||
|
|
||||||
|
Alternatively, you can use the `AWS_BUCKET` environment variable to specify the bucket name.
|
||||||
|
|
||||||
|
## Create an instance and connect to it
|
||||||
|
|
||||||
|
With the image created, we can now create an instance.
|
||||||
|
You won't be able to see the serial console output until after it has terminated.
|
||||||
|
|
||||||
|
```
|
||||||
|
linuxkit run aws aws
|
||||||
|
```
|
||||||
|
|
||||||
|
You can edit the AWS example to allow you to SSH to your instance in order to use it.
|
@ -7,6 +7,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
log "github.com/Sirupsen/logrus"
|
log "github.com/Sirupsen/logrus"
|
||||||
|
Loading…
Reference in New Issue
Block a user