Adds force docker service start
Despite being started via upstart in rare cases docker service wasn't available on VM first boot. This commit adds force server star step Change-Id: I6fb0d247a4333c9444629c23dbc259de12f05805 Closes-Bug: #1449510 (cherry picked from commit 6944505e75aee39058eb2567f872c3416ca3fd60)
This commit is contained in:
parent
fbc1ee11f8
commit
626370becf
@ -62,10 +62,12 @@ Methods:
|
|||||||
Then:
|
Then:
|
||||||
- $._environment.reporter.report($this, 'Create VM for Docker Server')
|
- $._environment.reporter.report($this, 'Create VM for Docker Server')
|
||||||
- $.instance.deploy()
|
- $.instance.deploy()
|
||||||
|
- $resources: new(sys:Resources)
|
||||||
|
- $template: $resources.yaml('StartDocker.template')
|
||||||
|
- $.instance.agent.call($template, $resources)
|
||||||
- If: $.dockerRegistry != null and $.dockerRegistry != ''
|
- If: $.dockerRegistry != null and $.dockerRegistry != ''
|
||||||
Then:
|
Then:
|
||||||
- $._environment.reporter.report($this, 'Configuring Docker registry')
|
- $._environment.reporter.report($this, 'Configuring Docker registry')
|
||||||
- $resources: new(sys:Resources)
|
|
||||||
- $template: $resources.yaml('SetupDockerRegistry.template').bind(dict(
|
- $template: $resources.yaml('SetupDockerRegistry.template').bind(dict(
|
||||||
dockerRegistry => $.dockerRegistry
|
dockerRegistry => $.dockerRegistry
|
||||||
))
|
))
|
||||||
|
31
DockerStandaloneHost/package/Resources/StartDocker.template
Normal file
31
DockerStandaloneHost/package/Resources/StartDocker.template
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
FormatVersion: 2.0.0
|
||||||
|
Version: 1.0.0
|
||||||
|
Name: Start docker service
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
image: $image
|
||||||
|
|
||||||
|
Body: |
|
||||||
|
startDocker()
|
||||||
|
|
||||||
|
Scripts:
|
||||||
|
startDocker:
|
||||||
|
Type: Application
|
||||||
|
Version: 1.0.0
|
||||||
|
EntryPoint: startDocker.sh
|
||||||
|
Options:
|
||||||
|
captureStdout: false
|
||||||
|
captureStderr: false
|
||||||
|
verifyExitcode: false
|
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
service docker start
|
Loading…
x
Reference in New Issue
Block a user