Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data_image http/https proxy #147

Open
bcg62 opened this issue Mar 13, 2018 · 2 comments
Open

data_image http/https proxy #147

bcg62 opened this issue Mar 13, 2018 · 2 comments

Comments

@bcg62
Copy link

bcg62 commented Mar 13, 2018

My CI jobs live behind a proxy and it seems like there is no way to interject intermediate steps or docker build-arg for the data_image.

https://github.com/someara/kitchen-dokken/blob/master/lib/kitchen/helpers.rb

This is an issue as I cannot install RPMs without the proxy properly being setup.

Am I missing something or someway to work around this? Maybe even being able to provide your own image here?

@joerg
Copy link

joerg commented Apr 19, 2018

I also have to work in an airgapped environment without internet. We do have an Artifactory Server which has access to the internet and thus can proxy Docker and other repos.

---
driver:
  name: dokken
  chef_version: 12.12.13
  chef_image: docker.local.corp/chef/chef
  data_image: docker.local.corp/dokken/kitchen-cache:latest

driver_config:
  hostname: kitchen.local.corp

transport:
  name: dokken

provisioner:
  name: dokken
  client_rb:
    rubygems_url: https://local.corp/artifactory/api/gems/gems/

platforms:
  - name: rhel-6.9
    driver:
      image: docker.local.corp/redhat6-mini:6.9
  - name: rhel-7.4
    driver:
      image: docker.local.corp/redhat7-mini:7.4
      privileged: true
      pid_one_command: /usr/lib/systemd/systemd
      volumes:
        - /sys/fs/cgroup:/sys/fs/cgroup:ro # required by systemd

verifier:
  name: inspec

suites:
  - name: default
     ...

Where exactly does your kitchen run fail? Without logs it is hard to guess what the problem is.

jbartko pushed a commit to jbartko/kitchen-dokken that referenced this issue Aug 31, 2018
jbartko pushed a commit to jbartko/kitchen-dokken that referenced this issue Aug 31, 2018
Addresses test-kitchen#147

**User Story**
As a build engineer,
I want to use kitchen-dokken behind a proxy without direct access to the
  internet,
So that it may be used in corporate CI/CD pipelines.

**Test Case**
*GIVEN* instance executing kitchen does not have direct internet access
*WHEN* performing integration testing with kitchen-dokken
*EXPECT* the ability to pull Docker images via proxy
*EXPECT* the ability to control proxy access while building the baked-in
  data_image

Maybe not the best approach, but it provides the minimum flexibility needed to
perform testing in an environment with strict access control.
jbartko pushed a commit to jbartko/kitchen-dokken that referenced this issue Aug 31, 2018
Addresses test-kitchen#147

**User Story**
As a build engineer,
I want to use kitchen-dokken behind a proxy without direct access to the
  internet,
So that it may be used in corporate CI/CD pipelines.

**Test Case**
*GIVEN* instance executing kitchen does not have direct internet access
*WHEN* performing integration testing with kitchen-dokken
*EXPECT* the ability to pull Docker images via proxy
*EXPECT* the ability to control proxy access while building the baked-in
  data_image

Maybe not the best approach, but it provides the minimum flexibility needed to
perform testing in an environment with strict access control.
@marcparadise
Copy link
Contributor

@bcg62 could you confirm that the proposed changes in #166 would give you the hook you needed to set up the proxy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants