Class: Kitchen::Driver::Dokken

Inherits:
Base
  • Object
show all
Defined in:
lib/kitchen/driver/dokken.rb

Overview

Dokken driver for Kitchen.

Author:

Defined Under Namespace

Classes: PartialHash

Instance Method Summary collapse

Instance Method Details

#create(state) ⇒ Object



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/kitchen/driver/dokken.rb', line 77

def create(state)
  # Authenticate the private registry
  authenticate!

  # image to config
  pull_platform_image

  # network
  make_dokken_network

  # chef
  pull_chef_image
  create_chef_container state

  # data
  dokken_create_sandbox

  if remote_docker_host? || running_inside_docker?
    make_data_image
    start_data_container state
  end

  # work image
  build_work_image state

  # runner
  start_runner_container state

  # misc
  save_misc_state state
end

#destroy(_state) ⇒ Object



109
110
111
112
113
114
115
116
117
118
119
# File 'lib/kitchen/driver/dokken.rb', line 109

def destroy(_state)
  if remote_docker_host? || running_inside_docker?
    stop_data_container
    delete_data_container
  end

  stop_runner_container
  delete_runner_container
  delete_work_image
  dokken_delete_sandbox
end