diff --git a/.gitignore b/.gitignore index 95ba90c78..ecf9eb819 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ packer-builder-vsphere* bin/ test*.json crash.log -vpn/ diff --git a/clone/builder_acc_test.go b/clone/builder_acc_test.go index 6b2015c8f..dfece3151 100644 --- a/clone/builder_acc_test.go +++ b/clone/builder_acc_test.go @@ -441,7 +441,7 @@ func sshKeyConfig() string { config := defaultConfig() config["communicator"] = "ssh" config["ssh_username"] = "root" - config["ssh_private_key_file"] = "../test-key.pem" + config["ssh_private_key_file"] = "../test/test-key.pem" return commonT.RenderConfig(config) } diff --git a/teamcity-services.yml b/teamcity-services.yml index ab018745f..dfdc70f83 100644 --- a/teamcity-services.yml +++ b/teamcity-services.yml @@ -4,10 +4,10 @@ services: container_name: vpn image: jetbrainsinfra/openvpn volumes: - - ./vpn:/vpn:ro + - ./test:/vpn:ro cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun dns: 10.0.0.1 - command: --config /vpn/jetbrains-vsphere-lab.ovpn --script-security 2 --auth-user-pass /vpn/creds.txt + entrypoint: "sh -c 'echo ${VPN_PASSWORD} | openvpn --cd /vpn/ --config lab.ovpn --askpass /dev/stdin'" diff --git a/test/lab.ovpn b/test/lab.ovpn new file mode 100644 index 000000000..313d027f5 --- /dev/null +++ b/test/lab.ovpn @@ -0,0 +1,38 @@ +dev tun +persist-tun +persist-key +cipher AES-256-CBC +ncp-ciphers AES-256-GCM:AES-128-GCM +auth SHA1 +tls-client +client +resolv-retry infinite +remote 81.3.129.9 2000 tcp-client +remote-cert-tls server + +pkcs12 lab.p12 + + +# +# 2048 bit OpenVPN static key +# +-----BEGIN OpenVPN Static key V1----- +6c9efab783fc2ee1a558bcedeaf92f8d +85322bc05432fbb00745fcd00bb48857 +77cbf0c82462726a848657c56b62f6fd +b9b1622c633188e848ce78c1b4476e9f +938338532c79784f36d80156e3b29bcf +493e64c393ee216b776c7a5d62c03aa8 +5fc5fea73990612f07660988da133b61 +34c847e67f65b8af407ae0b2761de402 +49ede990747659a878acaaf8fa1a6201 +1aa8ec5aeb01ccf50d1dc6e675dea291 +8d4c199c1c126fee9c112ce16c736159 +3234d5eaea167f5e60d01ad618fd33bb +c262fb3d5227933d6149e45ab0246d58 +5f5d66d835fbfc8e8d51e0462194d835 +8f66f166ccef5616abba26dd38046a87 +9476359e2dc7a5b4dc045e3fbe39d6e6 +-----END OpenVPN Static key V1----- + +key-direction 1 diff --git a/test/lab.p12 b/test/lab.p12 new file mode 100644 index 000000000..e628d471c Binary files /dev/null and b/test/lab.p12 differ diff --git a/test-key.pem b/test/test-key.pem similarity index 100% rename from test-key.pem rename to test/test-key.pem diff --git a/test-key.pub b/test/test-key.pub similarity index 100% rename from test-key.pub rename to test/test-key.pub