Appearance
saya image pull
Pull image from remote repository
Synopsis
Pull image from remote repository (E.g. s3, http).
saya image pull [options] name[:tag]
Examples
The expected remote repository layout to enable automatic resource resolution using tag, platform and image-type is:
<repo-base>|
| -/<name>/<version>/<platform>/img.<img-type> <-- image
| -/<name>/<version>/<platform>/img.<img-type>.meta <-- meta-data (optional)
<platform> == os/arch[/archvariant, e.g linux/amd64, linux/arm64, linux/arm/v7
- Pull with automatic url resolution
# http repo
saya image pull webserver:v1 --img-type ova --repo-type http --http-repo-url=http://myrepo --http-base-path internal
# s3 repo
saya image pull webserver:v1 --img-type ova --repo-type s3 ----s3-bucket=saya.repo --s3-base-key internal
- Pull with manual source specification
# http repo
saya image pull webserver:v1 --img-type ova --repo-type http \
--img-src=http://localhost:9099/internal/webserver/v1/linux/amd64/img.ova \
--img-meta-src=http://localhost:9099/internal/webserver/v1/linux/amd64/img.ova.meta
# s3 repo
saya image pull webserver:v1 --img-type ova --repo-type s3 \
--img-src=s3://saya.repo/internal/webserver/v1/linux/amd64/img.ova \
--img-meta-src=s3://saya.repo/internal/webserver/v1/linux/amd64/img.ova.meta
- Specifying basic auth for http repository
saya image pull ... --http-auth-basic-username <user-name> --http-auth-basic-password <secret>
For security reason, please use environment variables or better the saya configuration file.
- Specifying s3 credentials
saya image pull ... --aws-access-key-id <access-key-id> --aws-secret-access-key <aws-secret-access-key>
For security reason, please use environment variables or better the saya configuration file.
Saya will automatically pick up the configuration for aws-cli (on linux .aws/config|credentials).
Credential can therefore be specified there.
E.g. given the saya_profile is defined, it can then be used as follows with saya:
AWS_PROFILE=saya_profile saya image pull ....
- Specifying minimal meta data if remote meta data is missing or not manually specified
Minimal meta data are: os-variant, image-type and platform
saya image pull .... --platform <platform> --os-variant <os-variant> --img-type <img-type>
Options
--aws-access-key-id string --aws-access-key-id <access-key-id>
--aws-ep-url string --s3-ep-url <https://to-my-alt-aws-endpoint>
--aws-ep-url-s3 string --aws-ep-url-s3 <https://to-my-s3-endpoint>
--aws-region string --aws-region us-east-1
--aws-secret-access-key string --aws-secret-access-key <aws-secret-access-key>
-h, --help help for pull
--http-auth-basic-password string --http-auth-basic-password secret (default "")
--http-auth-basic-username string --http-auth-basic-username uploader
--http-base-path string --http-base-path images
--http-repo-url string --http-repo-url http://172.17.0.2:8000/repos
--http-upload-strategy string --http-upload-strategy nexus-raw (nexus-raw|nexus-api|webdav)
--img-hash string --img-hash md5:xxxxx ; format <hash-type>:<hash-value>, supported types md5 sha256
--img-meta-src string --img-meta-src https://xxx : url to specify the image meta data source ; supported types: http[s], s3
--img-src string --img-url https://xxx ; url to specify source the image; supported types https[s], s3
--img-type string --img-type ova
--os-variant string --os-variant <ubuntu/debian/alpine,...>
--platform string --platform <linux/amd64, default is host platform>
--repo-type string --repo-type s3
--result-dst string --result-dst <new-file-path-to-create-and-write-structured-pull-json-result-to>
--s3-base-key string --s3-base-key internal/images
--s3-bucket string --s3-bucket img-bucket
--s3-use-path-style --s3-use-path-style true to allows the client to use path-style addressing, i.e., https://s3.amazonaws.com/BUCKET/KEY
Options inherited from parent commands
--config string config file (default is .saya.yaml file found in the current working directory or $HOME/.saya or /etc/saya/.saya.yaml
--forge string path of the directory that holds saya runtime data(e.g. local repository, VM data, transient session data, etc)
-l, --license-key string license key to use saya
--log-level string logging level, error|warn|info|debug|trace (default "info")
SEE ALSO
- saya image - Build, Push, Pull, List VM images