Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 25 additions & 23 deletions acceptance/assets/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: test-release

releases:
- name: bosh-warden-cpi
- name: bosh-docker-cpi
url: {{ .CPIReleaseURL }}
- name: sample-release
url: file://{{ .DummyCompiledReleasePath }}
Expand All @@ -17,8 +17,16 @@ resource_pools:
cert: ((mbus))
authorized_keys:
- ((ssh_tunnel.public_key))
blobstores:
- provider: local
options:
blobstore_path: /var/vcap/micro_bosh/data/cache
stemcell:
url: {{ .StemcellURL }}
cloud_properties:
ports:
- 22/tcp # ssh_tunnel
- 6868/tcp # agent mbus

disk_pools:
- name: default
Expand All @@ -28,39 +36,33 @@ networks:
- name: fake-network-name
type: manual
subnets:
- range: 10.244.0.40/30
gateway: 10.244.0.41
# Carved out of the docker network created by start-docker (10.245.0.0/16).
- range: 10.245.0.40/30
gateway: 10.245.0.41
dns: [8.8.8.8]
cloud_properties:
subnet: fake-subnet
name: director_network

cloud_provider:
template:
name: warden_cpi
release: bosh-warden-cpi
mbus: https://admin:admin@10.244.0.42:6868
name: docker_cpi
release: bosh-docker-cpi
mbus: https://admin:admin@10.245.0.42:6868
cert:
ca: ((mbus.ca))
ssh_tunnel:
host: 10.244.0.42
host: 10.245.0.42
port: 22
user: vcap
private_key: ((ssh_tunnel.private_key))
properties:
warden_cpi: &warden_cpi
actions:
expand_stemcell_tarball: false
warden:
connect_network: tcp
connect_address: 0.0.0.0:7777
network_pool: 10.244.0.0/16
host_ip: 192.168.54.4
docker_cpi: &docker_cpi
docker:
host: ((docker_host))
tls: ((docker_tls))
agent:
mbus: https://admin:admin@0.0.0.0:6868
blobstore:
provider: local
options:
blobstore_path: /var/vcap/micro_bosh/data/cache
start_containers_with_systemd: true

instance_groups:
- name: dummy_instance_group
Expand All @@ -71,10 +73,10 @@ instance_groups:
resource_pool: fake-resource-pool-name
networks:
- name: fake-network-name
static_ips: [10.244.0.42]
static_ips: [10.245.0.42]
persistent_disk_pool: default
properties:
cpi: *warden_cpi
cpi: *docker_cpi
dummy_with_properties:
echo_value: "hi"
ntp: []
Expand All @@ -88,7 +90,7 @@ variables:
type: certificate
options:
common_name: bosh.integration.test
alternative_names: [10.244.0.42]
alternative_names: [10.245.0.42]
ca: default_ca
- name: ssh_tunnel
type: ssh
52 changes: 29 additions & 23 deletions acceptance/assets/manifest_with_all_network_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: test-release

releases:
- name: bosh-warden-cpi
- name: bosh-docker-cpi
url: {{ .CPIReleaseURL }}
- name: sample-release
url: file://{{ .DummyCompiledReleasePath }}
Expand All @@ -17,8 +17,16 @@ resource_pools:
cert: ((mbus))
authorized_keys:
- ((ssh_tunnel.public_key))
blobstores:
- provider: local
options:
blobstore_path: /var/vcap/micro_bosh/data/cache
stemcell:
url: {{ .StemcellURL }}
cloud_properties:
ports:
- 22/tcp # ssh_tunnel
- 6868/tcp # agent mbus

disk_pools:
- name: persistent
Expand All @@ -28,43 +36,41 @@ networks:
- name: fake-network-name
type: manual
subnets:
- range: 10.244.0.40/30
gateway: 10.244.0.41
# Carved out of the docker network created by start-docker (10.245.0.0/16).
- range: 10.245.0.40/30
gateway: 10.245.0.41
dns: [8.8.8.8]
cloud_properties:
subnet: fake-subnet
name: director_network
- name: dynamic-network
type: dynamic
cloud_properties:
name: dynamic_network
- name: vip-network
type: vip
cloud_properties:
name: vip_network

cloud_provider:
template:
name: warden_cpi
release: bosh-warden-cpi
name: docker_cpi
release: bosh-docker-cpi
ssh_tunnel:
host: 10.244.0.42
host: 10.245.0.42
port: 22
user: vcap
private_key: ((ssh_tunnel.private_key))
mbus: https://admin:admin@10.244.0.42:6868
mbus: https://admin:admin@10.245.0.42:6868
cert:
ca: ((mbus.ca))
properties:
warden_cpi: &warden_cpi
actions:
expand_stemcell_tarball: false
warden:
connect_network: tcp
connect_address: 0.0.0.0:7777
network_pool: 10.244.0.0/16
host_ip: 192.168.54.4
docker_cpi: &docker_cpi
docker:
host: ((docker_host))
tls: ((docker_tls))
agent:
mbus: https://admin:admin@0.0.0.0:6868
blobstore:
provider: local
options:
blobstore_path: /var/vcap/micro_bosh/data/cache
start_containers_with_systemd: true

instance_groups:
- name: dummy_instance_group
Expand All @@ -75,13 +81,13 @@ instance_groups:
resource_pool: fake-resource-pool-name
networks:
- name: fake-network-name
static_ips: [10.244.0.42]
static_ips: [10.245.0.42]
default: [dns, gateway]
- name: dynamic-network
- name: vip-network
persistent_disk_pool: persistent
properties:
cpi: *warden_cpi
cpi: *docker_cpi
dummy_with_properties:
echo_value: "hi"
ntp: []
Expand All @@ -95,7 +101,7 @@ variables:
type: certificate
options:
common_name: bosh.integration.test
alternative_names: [10.244.0.42]
alternative_names: [10.245.0.42]
ca: default_ca
- name: ssh_tunnel
type: ssh
48 changes: 25 additions & 23 deletions acceptance/assets/modified_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: test-release

releases:
- name: bosh-warden-cpi
- name: bosh-docker-cpi
url: {{ .CPIReleaseURL }}
- name: sample-release
url: file://{{ .DummyCompiledReleasePath }}
Expand All @@ -17,8 +17,16 @@ resource_pools:
cert: ((mbus))
authorized_keys:
- ((ssh_tunnel.public_key))
blobstores:
- provider: local
options:
blobstore_path: /var/vcap/micro_bosh/data/cache
stemcell:
url: {{ .StemcellURL }}
cloud_properties:
ports:
- 22/tcp # ssh_tunnel
- 6868/tcp # agent mbus

disk_pools:
- name: default
Expand All @@ -28,39 +36,33 @@ networks:
- name: fake-network-name
type: manual
subnets:
- range: 10.244.0.40/30
gateway: 10.244.0.41
# Carved out of the docker network created by start-docker (10.245.0.0/16).
- range: 10.245.0.40/30
gateway: 10.245.0.41
dns: [8.8.8.8]
cloud_properties:
subnet: fake-subnet
name: director_network

cloud_provider:
template:
name: warden_cpi
release: bosh-warden-cpi
name: docker_cpi
release: bosh-docker-cpi
ssh_tunnel:
host: 10.244.0.42
host: 10.245.0.42
port: 22
user: vcap
private_key: ((ssh_tunnel.private_key))
mbus: https://admin:admin@10.244.0.42:6868
mbus: https://admin:admin@10.245.0.42:6868
cert:
ca: ((mbus.ca))
properties:
warden_cpi: &warden_cpi
actions:
expand_stemcell_tarball: false
warden:
connect_network: tcp
connect_address: 0.0.0.0:7777
network_pool: 10.244.0.0/16
host_ip: 192.168.54.4
docker_cpi: &docker_cpi
docker:
host: ((docker_host))
tls: ((docker_tls))
agent:
mbus: https://admin:admin@0.0.0.0:6868
blobstore:
provider: local
options:
blobstore_path: /var/vcap/micro_bosh/data/cache
start_containers_with_systemd: true

instance_groups:
- name: dummy_instance_group
Expand All @@ -71,11 +73,11 @@ instance_groups:
resource_pool: fake-resource-pool-name
networks:
- name: fake-network-name
static_ips: [10.244.0.42]
static_ips: [10.245.0.42]
persistent_disk_pool: default
properties:
new_job_property: new_property_value
cpi: *warden_cpi
cpi: *docker_cpi
dummy_with_properties:
echo_value: "hi"
ntp: []
Expand All @@ -89,7 +91,7 @@ variables:
type: certificate
options:
common_name: bosh.integration.test
alternative_names: [10.244.0.42]
alternative_names: [10.245.0.42]
ca: default_ca
- name: ssh_tunnel
type: ssh
8 changes: 8 additions & 0 deletions acceptance/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ type Config struct {
StemcellPath string `json:"stemcell_path"`
CPIReleasePath string `json:"cpi_release_path"`
DummyCompiledReleasePath string `json:"dummy_compiled_release_path"`

// Vars file supplying docker_host/docker_tls to the manifests; written by
// bin/test-acceptance-with-docker.
DockerVarsPath string `json:"docker_vars_path"`
}

func NewConfig(fs boshsys.FileSystem) (*Config, error) {
Expand Down Expand Up @@ -47,5 +51,9 @@ func (c *Config) Validate() error {
return errors.New("Must provide 'dummy_compiled_release_path' in config") //nolint:staticcheck
}

if c.DockerVarsPath == "" {
return errors.New("Must provide 'docker_vars_path' in config") //nolint:staticcheck
}

return nil
}
6 changes: 3 additions & 3 deletions acceptance/instance_ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (s *instanceSSH) setupSSH() (boshsys.File, error) {
}()

sshConfigTemplate := `
Host warden-vm
Host docker-vm
Hostname %s
User %s
StrictHostKeyChecking no
Expand Down Expand Up @@ -82,7 +82,7 @@ func (s *instanceSSH) RunCommand(cmd string) (stdout, stderr string, exitCode in

return s.runner.RunCommand(
"ssh",
"warden-vm",
"docker-vm",
"-F",
sshConfigFile.Name(),
cmd,
Expand All @@ -98,7 +98,7 @@ func (s *instanceSSH) RunCommandWithSudo(cmd string) (stdout, stderr string, exi

return s.runner.RunCommand(
"ssh",
"warden-vm",
"docker-vm",
"-F",
sshConfigFile.Name(),
fmt.Sprintf("echo %s | sudo -p '' -S %s", s.instancePassword, cmd),
Expand Down
Loading