Skip to content
On this page

saya image push

Push image to repository

Synopsis

Push image to repository. E.g. aws-ami, s3, azure, http repository.

saya image push [options] name[:tag]

Examples


Push will upload the image data to the remote repository following this layout:
<repo-base>|
           | -/<name>/<version>/<platform>/img.<img-type>        <-- image
           | -/<name>/<version>/<platform>/img.<img-type>.meta   <-- meta-data (optional)
           | -/<name>/<version>/<platform>/img.<img-type>.sha256 <-- image hs256 hash (optional)

<platform> == os/arch[/archvariant, e.g linux/amd64, linux/arm64, linux/arm/v7

- Push
  # http repo
  saya image push webserver:v1 --img-type ova --repo-type http --http-repo-url=http://myrepo --http-base-path internal 
  # s3 repo
  saya image push webserver:v1 --img-type ova --repo-type s3 ----s3-bucket=saya.repo --s3-base-key internal 

- Specifying basic auth for http repository
  saya image push ... --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 push ... --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 push ....

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 push
      --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-type string                   --img-type ova
      --platform string                   --platform linux/amd64
      --repo-type string                  --repo-type s3|http
      --s3-base-key string                --s3-base-key internal/images
      --s3-bucket string                  --s3-bucket img-bucket
      --s3-do-not-export-meta             --s3-do-not-export-meta true
      --s3-do-not-export-sha256           --s3-do-not-export-sha256 true
      --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