{"id":2018,"date":"2022-02-04T05:35:54","date_gmt":"2022-02-04T05:35:54","guid":{"rendered":"https:\/\/blog.samarthya.me\/wps\/?p=2018"},"modified":"2022-02-07T10:20:41","modified_gmt":"2022-02-07T10:20:41","slug":"spinnaker-docker-registry","status":"publish","type":"post","link":"https:\/\/blog.samarthya.me\/wps\/2022\/02\/04\/spinnaker-docker-registry\/","title":{"rendered":"Spinnaker: docker-registry"},"content":{"rendered":"\n<p>You will need a valid docker registry before you add any trigger in the pipeline in <code>Spinnaker<\/code><\/p>\n\n\n\n<figure class=\"wp-block-pullquote has-white-color has-luminous-vivid-orange-background-color has-text-color has-background\"><blockquote><p><a rel=\"noreferrer noopener\" href=\"https:\/\/spinnaker.io\/docs\/setup\/install\/providers\/docker-registry\/\" target=\"_blank\">Official documentation<\/a> is a good resource to seek more clarifications<\/p><cite>Spinnaker<\/cite><\/blockquote><\/figure>\n\n\n\n<p>In my case I have already added an account my-docker-registry as under (The final result after you successfully configure Docker.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bash-5.0$ hal config provider docker-registry account list\n+ Get current deployment\n  Success\n+ Get the dockerRegistry provider\n  Success\n+ Accounts for dockerRegistry:\n  - my-docker-registry<\/code><\/pre>\n\n\n\n<p>To get the details I used for adding using the <strong><span style=\"text-decoration: underline;\">hal<\/span><\/strong> to get the account<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bash-5.0$ hal config provider docker-registry account get my-docker-registry \n+ Get current deployment\n  Success\n+ Get my-docker-registry account\n  Success\n+ Account my-docker-registry: \nDockerRegistryAccount(address=https:\/\/index.docker.io, username=samarthya, password=-------------------, passwordCommand=null, email=saurabh777@gmail.com, cacheIntervalSeconds=30, clientTimeoutMillis=60000, cacheThreads=1, paginateSize=100, sortTagsByDate=false, trackDigests=false, insecureRegistry=false, repositories=&#91;samarthya\/spinnaker], repositoriesRegex=null, passwordFile=null, dockerconfigFile=null)\n+ MY-DOCKER-REGISTRY\n\nDockerRegistryAccount(address=https:\/\/index.docker.io, username=samarthya,\npassword=-------------------, passwordCommand=null,\nemail=saurabh777@gmail.com, cacheIntervalSeconds=30, clientTimeoutMillis=60000,\ncacheThreads=1, paginateSize=100, sortTagsByDate=false, trackDigests=false,\ninsecureRegistry=false, repositories=&#91;samarthya\/spinnaker],\nrepositoriesRegex=null, passwordFile=null, dockerconfigFile=null)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-add\">How to add?<\/h2>\n\n\n\n<p>Seek help at the console using the <code>-h<\/code> flag<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bash-5.0$ hal config provider docker-registry -h\nDOCKER-REGISTRY\n\n  Manage and view Spinnaker configuration for the dockerRegistry provider\n\nUSAGE\n\n  hal config provider docker-registry &#91;parameters] &#91;subcommands]\n\nGLOBAL PARAMETERS\n\n  --daemon-endpoint\n    If supplied, connect to the daemon at this address.\n\n  --options\n    Get options for the specified field name.\n\n  -a, --alpha\n    Enable alpha halyard features.\n\n  -c, --color\n    Enable terminal color output.\n\n  -d, --debug\n    Show detailed network traffic with halyard daemon.\n\n  -h, --help=false\n    Display help text about this command.\n\n  -l, --log\n    Set the log level of the CLI.\n\n  -o, --output\n    Format the CLIs output.\n\n  -q, --quiet\n    Show no task information or messages. When set, ANSI formatting will be\n    disabled, and all prompts will be accepted.\n\nPARAMETERS\n\n  --deployment\n    If supplied, use this Halyard deployment. This will _not_ create a new\n    deployment.\n\n  --no-validate=false\n    Skip validation.\n\nSUBCOMMANDS\n\n  account\n    Manage and view Spinnaker configuration for the dockerRegistry provider's\n    account\n\n  disable\n    Set the dockerRegistry provider as disabled\n\n  enable\n    Set the dockerRegistry provider as enabled<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"adding-account\">Adding account<\/h2>\n\n\n\n<p>The basic configuration options for docker-registry are add, delete, get (look below)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bash-5.0$ hal config provider docker-registry account -h\nACCOUNT\n\n  Manage and view Spinnaker configuration for the dockerRegistry provider's\n  account\n\nUSAGE\n\n  hal config provider docker-registry account &#91;parameters] &#91;subcommands]\n\nGLOBAL PARAMETERS\n\n  --daemon-endpoint\n    If supplied, connect to the daemon at this address.\n\n  --options\n    Get options for the specified field name.\n\n  -a, --alpha\n    Enable alpha halyard features.\n\n  -c, --color\n    Enable terminal color output.\n\n  -d, --debug\n    Show detailed network traffic with halyard daemon.\n\n  -h, --help=false\n    Display help text about this command.\n\n  -l, --log\n    Set the log level of the CLI.\n\n  -o, --output\n    Format the CLIs output.\n\n  -q, --quiet\n    Show no task information or messages. When set, ANSI formatting will be\n    disabled, and all prompts will be accepted.\n\nPARAMETERS\n\n  ACCOUNT\n    The name of the account to operate on.\n\n  --deployment\n    If supplied, use this Halyard deployment. This will _not_ create a new\n    deployment.\n\n  --no-validate=false\n    Skip validation.\n\nSUBCOMMANDS\n\n  add\n    Add an account to the dockerRegistry provider.\n\n  delete\n    Delete a specific dockerRegistry account by name.\n\n  edit\n    Edit an account in the dockerRegistry provider.\n\n  get\n    Get the specified account details for the dockerRegistry provider.\n\n  list\n    List the account names for the dockerRegistry provider.<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"hal-config-provider-docker-registry-account-add\"><code>hal config provider docker-registry account add<\/code><\/h2>\n\n\n\n<figure class=\"wp-block-pullquote has-white-color has-vivid-green-cyan-background-color has-text-color has-background\"><blockquote><p>The DockerHub registry address is\u00a0<code>index.docker.io<\/code><\/p><cite><code>ADDRESS<strong>=<\/strong>index.docker.<\/code>io<\/cite><\/blockquote><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Options 1 name of the account <code>my-docker-registry<\/code><\/li><li>Option 2 <code>--email<\/code>=&lt;a valid email><\/li><li>Option 3 <code>--username<\/code><\/li><li>Option 4 <code>--address=index.docker.io<\/code><\/li><li>Option 4 <code>--password<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>PARAMETERS\n\n  ACCOUNT\n    The name of the account to operate on.\n\n  --address=gcr.io (required)\n    The registry address you want to pull and deploy images from. For example:\n    \n    index.docker.io     - DockerHub\n    quay.io             - Quay\n    gcr.io              - Google Container Registry (GCR)\n    &#91;us|eu|asia].gcr.io - Regional GCR\n    localhost           - Locally deployed registry\n\n  --cache-interval-seconds=30\n    How many seconds elapse between polling your docker registry. Certain registries\n    are sensitive to over-polling, and larger intervals (e.g. 10 minutes = 600\n    seconds) are desirable if you're seeing rate limiting.\n\n  --cache-threads=1\n    How many threads to cache all provided repos on. Really only useful if you have\n    a ton of repos.\n\n  --client-timeout-millis=60000\n    Timeout time in milliseconds for this repository.\n\n  --deployment\n    If supplied, use this Halyard deployment. This will _not_ create a new\n    deployment.\n\n  --email=fake.email@spinnaker.io\n    Your docker registry email (often this only needs to be well-formed, rather than\n    be a real address)\n\n  --environment\n    The environment name for the account. Many accounts can share the same\n    environment (e.g. dev, test, prod)\n\n  --insecure-registry=false\n    Treat the docker registry as insecure (don't validate the ssl cert).\n\n  --no-validate=false\n    Skip validation.\n\n  --paginate-size=100\n    Paginate size for the docker repository _catalog endpoint.\n\n  --password (sensitive data - user will be prompted)\n    Your docker registry password\n\n  --password-command\n    Command to retrieve docker token\/password, commands must be available in\n    environment\n\n  --password-file\n    The path to a file containing your docker password in plaintext (not a\n    docker\/config.json file)\n\n  --read-permissions=&#91;]\n    A user must have at least one of these roles in order to view this account's\n    cloud resources.\n\n  --repositories=&#91;]\n    An optional list of repositories to cache images from. If not provided,\n    Spinnaker will attempt to read accessible repositories from the registries\n    _catalog endpoint\n\n  --repositories-regex\n    Allows to specify a Regular Expression to filter the repositories.\n\n  --required-group-membership=&#91;]\n    A user must be a member of at least one specified group in order to make changes\n    to this account's cloud resources.\n\n  --sort-tags-by-date=false\n    Sort tags by creation date. Not recommended for use with large registries;\n    sorting performance scales poorly due to limitations of the Docker V2 API.\n\n  --track-digests=false\n    Track digest changes. This is not recommended as it consumes a high QPM, and\n    most registries are flaky.\n\n  --username\n    Your docker registry username\n\n  --write-permissions=&#91;]\n    A user must have at least one of these roles in order to make changes to this\n    account's cloud resources.<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You will need a valid docker registry before you add any trigger in the pipeline in Spinnaker Official documentation is a good resource to seek more clarifications Spinnaker In my case I have already added an account my-docker-registry as under (The final result after you successfully configure Docker. To get the details I used for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2019,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[86,34],"tags":[82,231,227],"class_list":["post-2018","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-docker","category-technical","tag-docker","tag-provider","tag-spinnaker","post_format-post-format-image"],"_links":{"self":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts\/2018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/comments?post=2018"}],"version-history":[{"count":0,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts\/2018\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/media\/2019"}],"wp:attachment":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/media?parent=2018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/categories?post=2018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/tags?post=2018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}