Add custom docker registry to DockerStandaloneHost

Allow access to private docker registry using docker argument
'--insecure-registry'.
Add new field for docker private registry host ip or domain name.

Partially implements: blueprint k8s-docker-enterprise-hub-support

Change-Id: I0e7b0ceebe9deda090fff56ec87f3c615050cc2a
This commit is contained in:
Tetiana Lashchova
2015-10-20 17:28:01 +03:00
parent 0549313491
commit f75e1e9700
6 changed files with 90 additions and 28 deletions

View File

@@ -31,6 +31,9 @@ Properties:
dockerRegistry:
Contract: $.string()
dockerMirror:
Contract: $.string()
applicationEndpoints:
Contract:
- port: $.int().notNull().check($ > 0)
@@ -65,11 +68,13 @@ Methods:
- $resources: new(sys:Resources)
- $template: $resources.yaml('StartDocker.template')
- $.instance.agent.call($template, $resources)
- If: $.dockerRegistry != null and $.dockerRegistry != ''
- If: $.dockerMirror != null and $.dockerMirror != ''
or $.dockerRegistry != null and $.dockerRegistry != ''
Then:
- $._environment.reporter.report($this, 'Configuring Docker registry')
- $template: $resources.yaml('SetupDockerRegistry.template').bind(dict(
dockerRegistry => $.dockerRegistry
- $._environment.reporter.report($this, 'Configuring Docker options')
- $template: $resources.yaml('SetupDockerOptions.template').bind(dict(
dockerRegistry => $.dockerRegistry,
dockerMirror => $.dockerMirror
))
- $.instance.agent.call($template, $resources)
- $._environment.reporter.report($this, 'Docker Server is up and running')