diff --git a/docker/Genymotion b/docker/Genymotion index fe5ed78..47aaea3 100644 --- a/docker/Genymotion +++ b/docker/Genymotion @@ -16,6 +16,8 @@ WORKDIR /root # Process manager # socat # Port forwarder +# keychain +# ssh-key creator #------------------ # Genymotion spec #------------------ @@ -46,6 +48,7 @@ RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \ xterm \ supervisor \ socat \ + keychain \ bzip2 \ x11vnc \ openbox \ @@ -91,8 +94,8 @@ ENV DISPLAY=:0 \ #==================== # Install genymotion #==================== +RUN echo | ssh-keygen ARG GENYMOTION_VERSION=2.12.1 - ENV GENYMOTION=true \ GENYMOTION_VERSION=$GENYMOTION_VERSION \ PATH="${PATH}:/opt/genymobile/genymotion/" \ diff --git a/src/appium.sh b/src/appium.sh index e2e19a5..aaf964f 100644 --- a/src/appium.sh +++ b/src/appium.sh @@ -102,11 +102,17 @@ data "aws_ami" "geny_aws_$index" { owners = ["679593333241"] #Genymotion } +resource "aws_key_pair" "geny_key_$index" { + provider = "aws.provider_$index" + public_key = "${file("~/.ssh/id_rsa.pub")}" +} + resource "aws_instance" "geny_aws_$index" { provider = "aws.provider_$index" ami = "\${data.aws_ami.geny_aws_$index.id}" instance_type = "\${var.instance_type_$index}" vpc_security_group_ids = ["\${aws_security_group.geny_sg_$index.name}"] + key_name = "\${aws_key_pair.geny_key_$index.key_name}" tags { Name = "EK-\${data.aws_ami.geny_aws_$index.id}" } @@ -138,6 +144,8 @@ _EOF # Connect with adb # TODO + # ssh -i ~/.ssh/id_rsa -oStrictHostKeyChecking=no $(./terraform output public_dns_$index.id) 'setprop persist.sys.usb.config adb && exit' + } function run_appium() {