diff --git a/build.gradle.kts b/build.gradle.kts index 6e095062..726d8f42 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,6 +25,7 @@ configurations.all { "com.google.code.gson:gson" -> useVersion("2.8.2") "org.jsoup:jsoup" -> useVersion("1.10.2") "com.jcraft:jzlib" -> useVersion("1.1.3") + "commons-codec:commons-codec" -> useVersion("1.11") } when (requested.group) { "org.jetbrains.kotlin" -> useVersion(kotlinVersion) @@ -34,6 +35,7 @@ configurations.all { } dependencies { + api(fileTree(mapOf("dir" to "lib", "include" to "*.jar"))) api("com.atlassian.performance.tools:infrastructure:[4.12.2,5.0.0)") api("com.atlassian.performance.tools:aws-resources:[1.1.1,2.0.0)") api("com.atlassian.performance.tools:jira-actions:[2.0.0,4.0.0)") diff --git a/gradle/dependency-locks/apiDependenciesMetadata.lockfile b/gradle/dependency-locks/apiDependenciesMetadata.lockfile index e44478db..4bdeda1b 100644 --- a/gradle/dependency-locks/apiDependenciesMetadata.lockfile +++ b/gradle/dependency-locks/apiDependenciesMetadata.lockfile @@ -1,29 +1,31 @@ # This is a Gradle generated file for dependency locking. # Manual edits can break the build and are not advised. # This file is expected to be part of source control. -com.amazonaws:aws-java-sdk-cloudformation:1.11.424 -com.amazonaws:aws-java-sdk-core:1.11.424 -com.amazonaws:aws-java-sdk-ec2:1.11.424 -com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.424 -com.amazonaws:aws-java-sdk-iam:1.11.424 -com.amazonaws:aws-java-sdk-kms:1.11.424 -com.amazonaws:aws-java-sdk-rds:1.11.424 -com.amazonaws:aws-java-sdk-s3:1.11.424 -com.amazonaws:aws-java-sdk-sts:1.11.424 -com.amazonaws:aws-java-sdk-support:1.11.424 -com.amazonaws:jmespath-java:1.11.424 -com.atlassian.performance.tools:aws-resources:1.4.0 -com.atlassian.performance.tools:concurrency:1.0.0 -com.atlassian.performance.tools:infrastructure:4.12.6 +com.amazonaws:aws-java-sdk-cloudformation:1.11.817 +com.amazonaws:aws-java-sdk-core:1.11.817 +com.amazonaws:aws-java-sdk-ec2:1.11.817 +com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.817 +com.amazonaws:aws-java-sdk-iam:1.11.817 +com.amazonaws:aws-java-sdk-kms:1.11.817 +com.amazonaws:aws-java-sdk-rds:1.11.817 +com.amazonaws:aws-java-sdk-s3:1.11.817 +com.amazonaws:aws-java-sdk-sts:1.11.817 +com.amazonaws:aws-java-sdk-support:1.11.817 +com.amazonaws:jmespath-java:1.11.817 +com.atlassian.data:random-data:1.4.3 +com.atlassian.performance.tools:aws-resources:1.7.0 +com.atlassian.performance.tools:concurrency:1.1.0 +com.atlassian.performance.tools:infrastructure:4.18.0 com.atlassian.performance.tools:io:1.2.0 -com.atlassian.performance.tools:jira-actions:3.3.0 -com.atlassian.performance.tools:jira-software-actions:1.3.1 -com.atlassian.performance.tools:jvm-tasks:1.0.1 -com.atlassian.performance.tools:ssh:2.3.0 -com.atlassian.performance.tools:virtual-users:3.6.4 +com.atlassian.performance.tools:jira-actions:3.16.0 +com.atlassian.performance.tools:jira-software-actions:1.3.3 +com.atlassian.performance.tools:jvm-tasks:1.2.1 +com.atlassian.performance.tools:ssh:2.4.0 +com.atlassian.performance.tools:virtual-users:3.13.0 +com.atlassian.performance:selenium-js:1.0.1 com.fasterxml.jackson.core:jackson-annotations:2.6.0 com.fasterxml.jackson.core:jackson-core:2.9.4 -com.fasterxml.jackson.core:jackson-databind:2.6.7.1 +com.fasterxml.jackson.core:jackson-databind:2.6.7.3 com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7 com.github.stephenc.jcip:jcip-annotations:1.0-1 com.google.code.findbugs:jsr305:1.3.9 @@ -33,13 +35,13 @@ com.google.guava:guava:23.6-jre com.google.j2objc:j2objc-annotations:1.1 com.hierynomus:sshj:0.23.0 com.jcraft:jzlib:1.1.3 -com.squareup.okhttp3:okhttp:3.9.1 -com.squareup.okio:okio:1.13.0 +com.squareup.okhttp3:okhttp:3.11.0 +com.squareup.okio:okio:1.14.0 com.sun.istack:istack-commons-runtime:3.0.5 com.sun.xml.fastinfoset:FastInfoset:1.2.13 com.typesafe:config:1.2.1 commons-cli:commons-cli:1.4 -commons-codec:commons-codec:1.10 +commons-codec:commons-codec:1.11 commons-io:commons-io:2.5 commons-logging:commons-logging:1.2 io.github.bonigarcia:webdrivermanager:1.7.1 @@ -47,7 +49,7 @@ javax.activation:activation:1.1.1 javax.inject:javax.inject:1 javax.xml.bind:jaxb-api:2.3.0 joda-time:joda-time:2.8.1 -net.bytebuddy:byte-buddy:1.7.9 +net.bytebuddy:byte-buddy:1.8.15 net.i2p.crypto:eddsa:0.2.0 org.apache.commons:commons-compress:1.9 org.apache.commons:commons-csv:1.3 @@ -105,10 +107,10 @@ org.jetbrains:annotations:13.0 org.jsoup:jsoup:1.10.2 org.jvnet.staxex:stax-ex:1.7.8 org.rauschig:jarchivelib:0.7.1 -org.seleniumhq.selenium:selenium-api:3.11.0 -org.seleniumhq.selenium:selenium-chrome-driver:3.11.0 -org.seleniumhq.selenium:selenium-remote-driver:3.11.0 -org.seleniumhq.selenium:selenium-support:3.11.0 +org.seleniumhq.selenium:selenium-api:3.141.59 +org.seleniumhq.selenium:selenium-chrome-driver:3.141.59 +org.seleniumhq.selenium:selenium-remote-driver:3.141.59 +org.seleniumhq.selenium:selenium-support:3.141.59 org.slf4j:slf4j-api:1.8.0-alpha2 org.sonatype.plexus:plexus-cipher:1.4 org.sonatype.plexus:plexus-sec-dispatcher:1.4 diff --git a/gradle/dependency-locks/compileClasspath.lockfile b/gradle/dependency-locks/compileClasspath.lockfile index cfdf614e..99aa99e9 100644 --- a/gradle/dependency-locks/compileClasspath.lockfile +++ b/gradle/dependency-locks/compileClasspath.lockfile @@ -1,29 +1,30 @@ # This is a Gradle generated file for dependency locking. # Manual edits can break the build and are not advised. # This file is expected to be part of source control. -com.amazonaws:aws-java-sdk-cloudformation:1.11.424 -com.amazonaws:aws-java-sdk-core:1.11.424 -com.amazonaws:aws-java-sdk-ec2:1.11.424 -com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.424 -com.amazonaws:aws-java-sdk-iam:1.11.424 -com.amazonaws:aws-java-sdk-kms:1.11.424 -com.amazonaws:aws-java-sdk-rds:1.11.424 -com.amazonaws:aws-java-sdk-s3:1.11.424 -com.amazonaws:aws-java-sdk-sts:1.11.424 -com.amazonaws:aws-java-sdk-support:1.11.424 -com.amazonaws:jmespath-java:1.11.424 -com.atlassian.performance.tools:aws-resources:1.4.0 -com.atlassian.performance.tools:concurrency:1.0.0 -com.atlassian.performance.tools:infrastructure:4.12.6 +com.amazonaws:aws-java-sdk-cloudformation:1.11.817 +com.amazonaws:aws-java-sdk-core:1.11.817 +com.amazonaws:aws-java-sdk-ec2:1.11.817 +com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.817 +com.amazonaws:aws-java-sdk-iam:1.11.817 +com.amazonaws:aws-java-sdk-kms:1.11.817 +com.amazonaws:aws-java-sdk-rds:1.11.817 +com.amazonaws:aws-java-sdk-s3:1.11.817 +com.amazonaws:aws-java-sdk-sts:1.11.817 +com.amazonaws:aws-java-sdk-support:1.11.817 +com.amazonaws:jmespath-java:1.11.817 +com.atlassian.performance.tools:aws-resources:1.7.0 +com.atlassian.performance.tools:concurrency:1.1.0 +com.atlassian.performance.tools:infrastructure:4.18.0 com.atlassian.performance.tools:io:1.2.0 -com.atlassian.performance.tools:jira-actions:3.3.0 -com.atlassian.performance.tools:jvm-tasks:1.0.1 -com.atlassian.performance.tools:ssh:2.3.0 -com.atlassian.performance.tools:virtual-users:3.6.4 -com.atlassian.performance.tools:workspace:2.0.0 +com.atlassian.performance.tools:jira-actions:3.16.0 +com.atlassian.performance.tools:jvm-tasks:1.2.1 +com.atlassian.performance.tools:ssh:2.4.0 +com.atlassian.performance.tools:virtual-users:3.13.0 +com.atlassian.performance.tools:workspace:2.0.2 +com.atlassian.performance:selenium-js:1.0.1 com.fasterxml.jackson.core:jackson-annotations:2.6.0 com.fasterxml.jackson.core:jackson-core:2.9.4 -com.fasterxml.jackson.core:jackson-databind:2.6.7.1 +com.fasterxml.jackson.core:jackson-databind:2.6.7.3 com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7 com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.4 com.github.stephenc.jcip:jcip-annotations:1.0-1 @@ -33,14 +34,18 @@ com.google.guava:guava:23.6-jre com.google.j2objc:j2objc-annotations:1.1 com.hierynomus:sshj:0.23.0 com.jcraft:jzlib:1.1.3 +com.squareup.okhttp3:okhttp:3.11.0 +com.squareup.okio:okio:1.14.0 com.sun.istack:istack-commons-runtime:3.0.5 com.sun.xml.fastinfoset:FastInfoset:1.2.13 -commons-codec:commons-codec:1.10 +commons-codec:commons-codec:1.11 commons-logging:commons-logging:1.2 javax.activation:activation:1.1.1 javax.xml.bind:jaxb-api:2.3.0 joda-time:joda-time:2.8.1 +net.bytebuddy:byte-buddy:1.8.15 net.i2p.crypto:eddsa:0.2.0 +org.apache.commons:commons-exec:1.3 org.apache.httpcomponents:httpclient:4.5.5 org.apache.httpcomponents:httpcore:4.4.9 org.apache.logging.log4j:log4j-api:2.10.0 @@ -58,12 +63,12 @@ org.glassfish:javax.json:1.1 org.jetbrains.kotlin:kotlin-stdlib-common:1.2.70 org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.70 org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.70 -org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.70 -org.jetbrains.kotlin:kotlin-stdlib-jre8:1.2.70 org.jetbrains.kotlin:kotlin-stdlib:1.2.70 org.jetbrains:annotations:13.0 org.jvnet.staxex:stax-ex:1.7.8 -org.seleniumhq.selenium:selenium-api:3.11.0 +org.seleniumhq.selenium:selenium-api:3.141.59 +org.seleniumhq.selenium:selenium-remote-driver:3.141.59 +org.seleniumhq.selenium:selenium-support:3.141.59 org.slf4j:slf4j-api:1.8.0-alpha2 org.yaml:snakeyaml:1.18 software.amazon.ion:ion-java:1.0.2 diff --git a/gradle/dependency-locks/default.lockfile b/gradle/dependency-locks/default.lockfile index ea02b845..71cac592 100644 --- a/gradle/dependency-locks/default.lockfile +++ b/gradle/dependency-locks/default.lockfile @@ -1,30 +1,32 @@ # This is a Gradle generated file for dependency locking. # Manual edits can break the build and are not advised. # This file is expected to be part of source control. -com.amazonaws:aws-java-sdk-cloudformation:1.11.424 -com.amazonaws:aws-java-sdk-core:1.11.424 -com.amazonaws:aws-java-sdk-ec2:1.11.424 -com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.424 -com.amazonaws:aws-java-sdk-iam:1.11.424 -com.amazonaws:aws-java-sdk-kms:1.11.424 -com.amazonaws:aws-java-sdk-rds:1.11.424 -com.amazonaws:aws-java-sdk-s3:1.11.424 -com.amazonaws:aws-java-sdk-sts:1.11.424 -com.amazonaws:aws-java-sdk-support:1.11.424 -com.amazonaws:jmespath-java:1.11.424 -com.atlassian.performance.tools:aws-resources:1.4.0 -com.atlassian.performance.tools:concurrency:1.0.0 -com.atlassian.performance.tools:infrastructure:4.12.6 +com.amazonaws:aws-java-sdk-cloudformation:1.11.817 +com.amazonaws:aws-java-sdk-core:1.11.817 +com.amazonaws:aws-java-sdk-ec2:1.11.817 +com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.817 +com.amazonaws:aws-java-sdk-iam:1.11.817 +com.amazonaws:aws-java-sdk-kms:1.11.817 +com.amazonaws:aws-java-sdk-rds:1.11.817 +com.amazonaws:aws-java-sdk-s3:1.11.817 +com.amazonaws:aws-java-sdk-sts:1.11.817 +com.amazonaws:aws-java-sdk-support:1.11.817 +com.amazonaws:jmespath-java:1.11.817 +com.atlassian.data:random-data:1.4.3 +com.atlassian.performance.tools:aws-resources:1.7.0 +com.atlassian.performance.tools:concurrency:1.1.0 +com.atlassian.performance.tools:infrastructure:4.18.0 com.atlassian.performance.tools:io:1.2.0 -com.atlassian.performance.tools:jira-actions:3.3.0 -com.atlassian.performance.tools:jira-software-actions:1.3.1 -com.atlassian.performance.tools:jvm-tasks:1.0.1 -com.atlassian.performance.tools:ssh:2.3.0 -com.atlassian.performance.tools:virtual-users:3.6.4 -com.atlassian.performance.tools:workspace:2.0.0 +com.atlassian.performance.tools:jira-actions:3.16.0 +com.atlassian.performance.tools:jira-software-actions:1.3.3 +com.atlassian.performance.tools:jvm-tasks:1.2.1 +com.atlassian.performance.tools:ssh:2.4.0 +com.atlassian.performance.tools:virtual-users:3.13.0 +com.atlassian.performance.tools:workspace:2.0.2 +com.atlassian.performance:selenium-js:1.0.1 com.fasterxml.jackson.core:jackson-annotations:2.6.0 com.fasterxml.jackson.core:jackson-core:2.9.4 -com.fasterxml.jackson.core:jackson-databind:2.6.7.1 +com.fasterxml.jackson.core:jackson-databind:2.6.7.3 com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7 com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.4 com.github.stephenc.jcip:jcip-annotations:1.0-1 @@ -37,13 +39,13 @@ com.googlecode.javaewah:JavaEWAH:1.1.6 com.hierynomus:sshj:0.23.0 com.jcraft:jsch:0.1.54 com.jcraft:jzlib:1.1.3 -com.squareup.okhttp3:okhttp:3.9.1 -com.squareup.okio:okio:1.13.0 +com.squareup.okhttp3:okhttp:3.11.0 +com.squareup.okio:okio:1.14.0 com.sun.istack:istack-commons-runtime:3.0.5 com.sun.xml.fastinfoset:FastInfoset:1.2.13 com.typesafe:config:1.2.1 commons-cli:commons-cli:1.4 -commons-codec:commons-codec:1.10 +commons-codec:commons-codec:1.11 commons-io:commons-io:2.5 commons-logging:commons-logging:1.2 io.github.bonigarcia:webdrivermanager:1.7.1 @@ -51,7 +53,7 @@ javax.activation:activation:1.1.1 javax.inject:javax.inject:1 javax.xml.bind:jaxb-api:2.3.0 joda-time:joda-time:2.8.1 -net.bytebuddy:byte-buddy:1.7.9 +net.bytebuddy:byte-buddy:1.8.15 net.i2p.crypto:eddsa:0.2.0 org.apache.commons:commons-compress:1.9 org.apache.commons:commons-csv:1.3 @@ -110,10 +112,10 @@ org.jetbrains:annotations:13.0 org.jsoup:jsoup:1.10.2 org.jvnet.staxex:stax-ex:1.7.8 org.rauschig:jarchivelib:0.7.1 -org.seleniumhq.selenium:selenium-api:3.11.0 -org.seleniumhq.selenium:selenium-chrome-driver:3.11.0 -org.seleniumhq.selenium:selenium-remote-driver:3.11.0 -org.seleniumhq.selenium:selenium-support:3.11.0 +org.seleniumhq.selenium:selenium-api:3.141.59 +org.seleniumhq.selenium:selenium-chrome-driver:3.141.59 +org.seleniumhq.selenium:selenium-remote-driver:3.141.59 +org.seleniumhq.selenium:selenium-support:3.141.59 org.slf4j:slf4j-api:1.8.0-alpha2 org.sonatype.plexus:plexus-cipher:1.4 org.sonatype.plexus:plexus-sec-dispatcher:1.4 diff --git a/gradle/dependency-locks/implementationDependenciesMetadata.lockfile b/gradle/dependency-locks/implementationDependenciesMetadata.lockfile index ea02b845..71cac592 100644 --- a/gradle/dependency-locks/implementationDependenciesMetadata.lockfile +++ b/gradle/dependency-locks/implementationDependenciesMetadata.lockfile @@ -1,30 +1,32 @@ # This is a Gradle generated file for dependency locking. # Manual edits can break the build and are not advised. # This file is expected to be part of source control. -com.amazonaws:aws-java-sdk-cloudformation:1.11.424 -com.amazonaws:aws-java-sdk-core:1.11.424 -com.amazonaws:aws-java-sdk-ec2:1.11.424 -com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.424 -com.amazonaws:aws-java-sdk-iam:1.11.424 -com.amazonaws:aws-java-sdk-kms:1.11.424 -com.amazonaws:aws-java-sdk-rds:1.11.424 -com.amazonaws:aws-java-sdk-s3:1.11.424 -com.amazonaws:aws-java-sdk-sts:1.11.424 -com.amazonaws:aws-java-sdk-support:1.11.424 -com.amazonaws:jmespath-java:1.11.424 -com.atlassian.performance.tools:aws-resources:1.4.0 -com.atlassian.performance.tools:concurrency:1.0.0 -com.atlassian.performance.tools:infrastructure:4.12.6 +com.amazonaws:aws-java-sdk-cloudformation:1.11.817 +com.amazonaws:aws-java-sdk-core:1.11.817 +com.amazonaws:aws-java-sdk-ec2:1.11.817 +com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.817 +com.amazonaws:aws-java-sdk-iam:1.11.817 +com.amazonaws:aws-java-sdk-kms:1.11.817 +com.amazonaws:aws-java-sdk-rds:1.11.817 +com.amazonaws:aws-java-sdk-s3:1.11.817 +com.amazonaws:aws-java-sdk-sts:1.11.817 +com.amazonaws:aws-java-sdk-support:1.11.817 +com.amazonaws:jmespath-java:1.11.817 +com.atlassian.data:random-data:1.4.3 +com.atlassian.performance.tools:aws-resources:1.7.0 +com.atlassian.performance.tools:concurrency:1.1.0 +com.atlassian.performance.tools:infrastructure:4.18.0 com.atlassian.performance.tools:io:1.2.0 -com.atlassian.performance.tools:jira-actions:3.3.0 -com.atlassian.performance.tools:jira-software-actions:1.3.1 -com.atlassian.performance.tools:jvm-tasks:1.0.1 -com.atlassian.performance.tools:ssh:2.3.0 -com.atlassian.performance.tools:virtual-users:3.6.4 -com.atlassian.performance.tools:workspace:2.0.0 +com.atlassian.performance.tools:jira-actions:3.16.0 +com.atlassian.performance.tools:jira-software-actions:1.3.3 +com.atlassian.performance.tools:jvm-tasks:1.2.1 +com.atlassian.performance.tools:ssh:2.4.0 +com.atlassian.performance.tools:virtual-users:3.13.0 +com.atlassian.performance.tools:workspace:2.0.2 +com.atlassian.performance:selenium-js:1.0.1 com.fasterxml.jackson.core:jackson-annotations:2.6.0 com.fasterxml.jackson.core:jackson-core:2.9.4 -com.fasterxml.jackson.core:jackson-databind:2.6.7.1 +com.fasterxml.jackson.core:jackson-databind:2.6.7.3 com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7 com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.4 com.github.stephenc.jcip:jcip-annotations:1.0-1 @@ -37,13 +39,13 @@ com.googlecode.javaewah:JavaEWAH:1.1.6 com.hierynomus:sshj:0.23.0 com.jcraft:jsch:0.1.54 com.jcraft:jzlib:1.1.3 -com.squareup.okhttp3:okhttp:3.9.1 -com.squareup.okio:okio:1.13.0 +com.squareup.okhttp3:okhttp:3.11.0 +com.squareup.okio:okio:1.14.0 com.sun.istack:istack-commons-runtime:3.0.5 com.sun.xml.fastinfoset:FastInfoset:1.2.13 com.typesafe:config:1.2.1 commons-cli:commons-cli:1.4 -commons-codec:commons-codec:1.10 +commons-codec:commons-codec:1.11 commons-io:commons-io:2.5 commons-logging:commons-logging:1.2 io.github.bonigarcia:webdrivermanager:1.7.1 @@ -51,7 +53,7 @@ javax.activation:activation:1.1.1 javax.inject:javax.inject:1 javax.xml.bind:jaxb-api:2.3.0 joda-time:joda-time:2.8.1 -net.bytebuddy:byte-buddy:1.7.9 +net.bytebuddy:byte-buddy:1.8.15 net.i2p.crypto:eddsa:0.2.0 org.apache.commons:commons-compress:1.9 org.apache.commons:commons-csv:1.3 @@ -110,10 +112,10 @@ org.jetbrains:annotations:13.0 org.jsoup:jsoup:1.10.2 org.jvnet.staxex:stax-ex:1.7.8 org.rauschig:jarchivelib:0.7.1 -org.seleniumhq.selenium:selenium-api:3.11.0 -org.seleniumhq.selenium:selenium-chrome-driver:3.11.0 -org.seleniumhq.selenium:selenium-remote-driver:3.11.0 -org.seleniumhq.selenium:selenium-support:3.11.0 +org.seleniumhq.selenium:selenium-api:3.141.59 +org.seleniumhq.selenium:selenium-chrome-driver:3.141.59 +org.seleniumhq.selenium:selenium-remote-driver:3.141.59 +org.seleniumhq.selenium:selenium-support:3.141.59 org.slf4j:slf4j-api:1.8.0-alpha2 org.sonatype.plexus:plexus-cipher:1.4 org.sonatype.plexus:plexus-sec-dispatcher:1.4 diff --git a/gradle/dependency-locks/runtimeClasspath.lockfile b/gradle/dependency-locks/runtimeClasspath.lockfile index ea02b845..71cac592 100644 --- a/gradle/dependency-locks/runtimeClasspath.lockfile +++ b/gradle/dependency-locks/runtimeClasspath.lockfile @@ -1,30 +1,32 @@ # This is a Gradle generated file for dependency locking. # Manual edits can break the build and are not advised. # This file is expected to be part of source control. -com.amazonaws:aws-java-sdk-cloudformation:1.11.424 -com.amazonaws:aws-java-sdk-core:1.11.424 -com.amazonaws:aws-java-sdk-ec2:1.11.424 -com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.424 -com.amazonaws:aws-java-sdk-iam:1.11.424 -com.amazonaws:aws-java-sdk-kms:1.11.424 -com.amazonaws:aws-java-sdk-rds:1.11.424 -com.amazonaws:aws-java-sdk-s3:1.11.424 -com.amazonaws:aws-java-sdk-sts:1.11.424 -com.amazonaws:aws-java-sdk-support:1.11.424 -com.amazonaws:jmespath-java:1.11.424 -com.atlassian.performance.tools:aws-resources:1.4.0 -com.atlassian.performance.tools:concurrency:1.0.0 -com.atlassian.performance.tools:infrastructure:4.12.6 +com.amazonaws:aws-java-sdk-cloudformation:1.11.817 +com.amazonaws:aws-java-sdk-core:1.11.817 +com.amazonaws:aws-java-sdk-ec2:1.11.817 +com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.817 +com.amazonaws:aws-java-sdk-iam:1.11.817 +com.amazonaws:aws-java-sdk-kms:1.11.817 +com.amazonaws:aws-java-sdk-rds:1.11.817 +com.amazonaws:aws-java-sdk-s3:1.11.817 +com.amazonaws:aws-java-sdk-sts:1.11.817 +com.amazonaws:aws-java-sdk-support:1.11.817 +com.amazonaws:jmespath-java:1.11.817 +com.atlassian.data:random-data:1.4.3 +com.atlassian.performance.tools:aws-resources:1.7.0 +com.atlassian.performance.tools:concurrency:1.1.0 +com.atlassian.performance.tools:infrastructure:4.18.0 com.atlassian.performance.tools:io:1.2.0 -com.atlassian.performance.tools:jira-actions:3.3.0 -com.atlassian.performance.tools:jira-software-actions:1.3.1 -com.atlassian.performance.tools:jvm-tasks:1.0.1 -com.atlassian.performance.tools:ssh:2.3.0 -com.atlassian.performance.tools:virtual-users:3.6.4 -com.atlassian.performance.tools:workspace:2.0.0 +com.atlassian.performance.tools:jira-actions:3.16.0 +com.atlassian.performance.tools:jira-software-actions:1.3.3 +com.atlassian.performance.tools:jvm-tasks:1.2.1 +com.atlassian.performance.tools:ssh:2.4.0 +com.atlassian.performance.tools:virtual-users:3.13.0 +com.atlassian.performance.tools:workspace:2.0.2 +com.atlassian.performance:selenium-js:1.0.1 com.fasterxml.jackson.core:jackson-annotations:2.6.0 com.fasterxml.jackson.core:jackson-core:2.9.4 -com.fasterxml.jackson.core:jackson-databind:2.6.7.1 +com.fasterxml.jackson.core:jackson-databind:2.6.7.3 com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7 com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.4 com.github.stephenc.jcip:jcip-annotations:1.0-1 @@ -37,13 +39,13 @@ com.googlecode.javaewah:JavaEWAH:1.1.6 com.hierynomus:sshj:0.23.0 com.jcraft:jsch:0.1.54 com.jcraft:jzlib:1.1.3 -com.squareup.okhttp3:okhttp:3.9.1 -com.squareup.okio:okio:1.13.0 +com.squareup.okhttp3:okhttp:3.11.0 +com.squareup.okio:okio:1.14.0 com.sun.istack:istack-commons-runtime:3.0.5 com.sun.xml.fastinfoset:FastInfoset:1.2.13 com.typesafe:config:1.2.1 commons-cli:commons-cli:1.4 -commons-codec:commons-codec:1.10 +commons-codec:commons-codec:1.11 commons-io:commons-io:2.5 commons-logging:commons-logging:1.2 io.github.bonigarcia:webdrivermanager:1.7.1 @@ -51,7 +53,7 @@ javax.activation:activation:1.1.1 javax.inject:javax.inject:1 javax.xml.bind:jaxb-api:2.3.0 joda-time:joda-time:2.8.1 -net.bytebuddy:byte-buddy:1.7.9 +net.bytebuddy:byte-buddy:1.8.15 net.i2p.crypto:eddsa:0.2.0 org.apache.commons:commons-compress:1.9 org.apache.commons:commons-csv:1.3 @@ -110,10 +112,10 @@ org.jetbrains:annotations:13.0 org.jsoup:jsoup:1.10.2 org.jvnet.staxex:stax-ex:1.7.8 org.rauschig:jarchivelib:0.7.1 -org.seleniumhq.selenium:selenium-api:3.11.0 -org.seleniumhq.selenium:selenium-chrome-driver:3.11.0 -org.seleniumhq.selenium:selenium-remote-driver:3.11.0 -org.seleniumhq.selenium:selenium-support:3.11.0 +org.seleniumhq.selenium:selenium-api:3.141.59 +org.seleniumhq.selenium:selenium-chrome-driver:3.141.59 +org.seleniumhq.selenium:selenium-remote-driver:3.141.59 +org.seleniumhq.selenium:selenium-support:3.141.59 org.slf4j:slf4j-api:1.8.0-alpha2 org.sonatype.plexus:plexus-cipher:1.4 org.sonatype.plexus:plexus-sec-dispatcher:1.4 diff --git a/gradle/dependency-locks/testCompileClasspath.lockfile b/gradle/dependency-locks/testCompileClasspath.lockfile index 82381b10..c8c48ca3 100644 --- a/gradle/dependency-locks/testCompileClasspath.lockfile +++ b/gradle/dependency-locks/testCompileClasspath.lockfile @@ -1,29 +1,30 @@ # This is a Gradle generated file for dependency locking. # Manual edits can break the build and are not advised. # This file is expected to be part of source control. -com.amazonaws:aws-java-sdk-cloudformation:1.11.424 -com.amazonaws:aws-java-sdk-core:1.11.424 -com.amazonaws:aws-java-sdk-ec2:1.11.424 -com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.424 -com.amazonaws:aws-java-sdk-iam:1.11.424 -com.amazonaws:aws-java-sdk-kms:1.11.424 -com.amazonaws:aws-java-sdk-rds:1.11.424 -com.amazonaws:aws-java-sdk-s3:1.11.424 -com.amazonaws:aws-java-sdk-sts:1.11.424 -com.amazonaws:aws-java-sdk-support:1.11.424 -com.amazonaws:jmespath-java:1.11.424 -com.atlassian.performance.tools:aws-resources:1.4.0 -com.atlassian.performance.tools:concurrency:1.0.0 -com.atlassian.performance.tools:infrastructure:4.12.6 +com.amazonaws:aws-java-sdk-cloudformation:1.11.817 +com.amazonaws:aws-java-sdk-core:1.11.817 +com.amazonaws:aws-java-sdk-ec2:1.11.817 +com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.817 +com.amazonaws:aws-java-sdk-iam:1.11.817 +com.amazonaws:aws-java-sdk-kms:1.11.817 +com.amazonaws:aws-java-sdk-rds:1.11.817 +com.amazonaws:aws-java-sdk-s3:1.11.817 +com.amazonaws:aws-java-sdk-sts:1.11.817 +com.amazonaws:aws-java-sdk-support:1.11.817 +com.amazonaws:jmespath-java:1.11.817 +com.atlassian.performance.tools:aws-resources:1.7.0 +com.atlassian.performance.tools:concurrency:1.1.0 +com.atlassian.performance.tools:infrastructure:4.18.0 com.atlassian.performance.tools:io:1.2.0 -com.atlassian.performance.tools:jira-actions:3.3.0 -com.atlassian.performance.tools:jvm-tasks:1.0.1 -com.atlassian.performance.tools:ssh:2.3.0 -com.atlassian.performance.tools:virtual-users:3.6.4 -com.atlassian.performance.tools:workspace:2.0.0 +com.atlassian.performance.tools:jira-actions:3.16.0 +com.atlassian.performance.tools:jvm-tasks:1.2.1 +com.atlassian.performance.tools:ssh:2.4.0 +com.atlassian.performance.tools:virtual-users:3.13.0 +com.atlassian.performance.tools:workspace:2.0.2 +com.atlassian.performance:selenium-js:1.0.1 com.fasterxml.jackson.core:jackson-annotations:2.6.0 com.fasterxml.jackson.core:jackson-core:2.9.4 -com.fasterxml.jackson.core:jackson-databind:2.6.7.1 +com.fasterxml.jackson.core:jackson-databind:2.6.7.3 com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7 com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.4 com.github.stephenc.jcip:jcip-annotations:1.0-1 @@ -33,15 +34,19 @@ com.google.guava:guava:23.6-jre com.google.j2objc:j2objc-annotations:1.1 com.hierynomus:sshj:0.23.0 com.jcraft:jzlib:1.1.3 +com.squareup.okhttp3:okhttp:3.11.0 +com.squareup.okio:okio:1.14.0 com.sun.istack:istack-commons-runtime:3.0.5 com.sun.xml.fastinfoset:FastInfoset:1.2.13 -commons-codec:commons-codec:1.10 +commons-codec:commons-codec:1.11 commons-logging:commons-logging:1.2 javax.activation:activation:1.1.1 javax.xml.bind:jaxb-api:2.3.0 joda-time:joda-time:2.8.1 junit:junit:4.12 +net.bytebuddy:byte-buddy:1.8.15 net.i2p.crypto:eddsa:0.2.0 +org.apache.commons:commons-exec:1.3 org.apache.httpcomponents:httpclient:4.5.5 org.apache.httpcomponents:httpcore:4.4.9 org.apache.logging.log4j:log4j-api:2.10.0 @@ -62,12 +67,12 @@ org.hamcrest:hamcrest-library:1.3 org.jetbrains.kotlin:kotlin-stdlib-common:1.2.70 org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.70 org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.70 -org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.70 -org.jetbrains.kotlin:kotlin-stdlib-jre8:1.2.70 org.jetbrains.kotlin:kotlin-stdlib:1.2.70 org.jetbrains:annotations:13.0 org.jvnet.staxex:stax-ex:1.7.8 -org.seleniumhq.selenium:selenium-api:3.11.0 +org.seleniumhq.selenium:selenium-api:3.141.59 +org.seleniumhq.selenium:selenium-remote-driver:3.141.59 +org.seleniumhq.selenium:selenium-support:3.141.59 org.slf4j:slf4j-api:1.8.0-alpha2 org.yaml:snakeyaml:1.18 software.amazon.ion:ion-java:1.0.2 diff --git a/gradle/dependency-locks/testImplementationDependenciesMetadata.lockfile b/gradle/dependency-locks/testImplementationDependenciesMetadata.lockfile index 051c13d9..34f2928b 100644 --- a/gradle/dependency-locks/testImplementationDependenciesMetadata.lockfile +++ b/gradle/dependency-locks/testImplementationDependenciesMetadata.lockfile @@ -1,30 +1,32 @@ # This is a Gradle generated file for dependency locking. # Manual edits can break the build and are not advised. # This file is expected to be part of source control. -com.amazonaws:aws-java-sdk-cloudformation:1.11.424 -com.amazonaws:aws-java-sdk-core:1.11.424 -com.amazonaws:aws-java-sdk-ec2:1.11.424 -com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.424 -com.amazonaws:aws-java-sdk-iam:1.11.424 -com.amazonaws:aws-java-sdk-kms:1.11.424 -com.amazonaws:aws-java-sdk-rds:1.11.424 -com.amazonaws:aws-java-sdk-s3:1.11.424 -com.amazonaws:aws-java-sdk-sts:1.11.424 -com.amazonaws:aws-java-sdk-support:1.11.424 -com.amazonaws:jmespath-java:1.11.424 -com.atlassian.performance.tools:aws-resources:1.4.0 -com.atlassian.performance.tools:concurrency:1.0.0 -com.atlassian.performance.tools:infrastructure:4.12.6 +com.amazonaws:aws-java-sdk-cloudformation:1.11.817 +com.amazonaws:aws-java-sdk-core:1.11.817 +com.amazonaws:aws-java-sdk-ec2:1.11.817 +com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.817 +com.amazonaws:aws-java-sdk-iam:1.11.817 +com.amazonaws:aws-java-sdk-kms:1.11.817 +com.amazonaws:aws-java-sdk-rds:1.11.817 +com.amazonaws:aws-java-sdk-s3:1.11.817 +com.amazonaws:aws-java-sdk-sts:1.11.817 +com.amazonaws:aws-java-sdk-support:1.11.817 +com.amazonaws:jmespath-java:1.11.817 +com.atlassian.data:random-data:1.4.3 +com.atlassian.performance.tools:aws-resources:1.7.0 +com.atlassian.performance.tools:concurrency:1.1.0 +com.atlassian.performance.tools:infrastructure:4.18.0 com.atlassian.performance.tools:io:1.2.0 -com.atlassian.performance.tools:jira-actions:3.3.0 -com.atlassian.performance.tools:jira-software-actions:1.3.1 -com.atlassian.performance.tools:jvm-tasks:1.0.1 -com.atlassian.performance.tools:ssh:2.3.0 -com.atlassian.performance.tools:virtual-users:3.6.4 -com.atlassian.performance.tools:workspace:2.0.0 +com.atlassian.performance.tools:jira-actions:3.16.0 +com.atlassian.performance.tools:jira-software-actions:1.3.3 +com.atlassian.performance.tools:jvm-tasks:1.2.1 +com.atlassian.performance.tools:ssh:2.4.0 +com.atlassian.performance.tools:virtual-users:3.13.0 +com.atlassian.performance.tools:workspace:2.0.2 +com.atlassian.performance:selenium-js:1.0.1 com.fasterxml.jackson.core:jackson-annotations:2.6.0 com.fasterxml.jackson.core:jackson-core:2.9.4 -com.fasterxml.jackson.core:jackson-databind:2.6.7.1 +com.fasterxml.jackson.core:jackson-databind:2.6.7.3 com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7 com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.4 com.github.stephenc.jcip:jcip-annotations:1.0-1 @@ -37,13 +39,13 @@ com.googlecode.javaewah:JavaEWAH:1.1.6 com.hierynomus:sshj:0.23.0 com.jcraft:jsch:0.1.54 com.jcraft:jzlib:1.1.3 -com.squareup.okhttp3:okhttp:3.9.1 -com.squareup.okio:okio:1.13.0 +com.squareup.okhttp3:okhttp:3.11.0 +com.squareup.okio:okio:1.14.0 com.sun.istack:istack-commons-runtime:3.0.5 com.sun.xml.fastinfoset:FastInfoset:1.2.13 com.typesafe:config:1.2.1 commons-cli:commons-cli:1.4 -commons-codec:commons-codec:1.10 +commons-codec:commons-codec:1.11 commons-io:commons-io:2.5 commons-logging:commons-logging:1.2 io.github.bonigarcia:webdrivermanager:1.7.1 @@ -52,7 +54,7 @@ javax.inject:javax.inject:1 javax.xml.bind:jaxb-api:2.3.0 joda-time:joda-time:2.8.1 junit:junit:4.12 -net.bytebuddy:byte-buddy:1.7.9 +net.bytebuddy:byte-buddy:1.8.15 net.i2p.crypto:eddsa:0.2.0 org.apache.commons:commons-compress:1.9 org.apache.commons:commons-csv:1.3 @@ -114,10 +116,10 @@ org.jetbrains:annotations:13.0 org.jsoup:jsoup:1.10.2 org.jvnet.staxex:stax-ex:1.7.8 org.rauschig:jarchivelib:0.7.1 -org.seleniumhq.selenium:selenium-api:3.11.0 -org.seleniumhq.selenium:selenium-chrome-driver:3.11.0 -org.seleniumhq.selenium:selenium-remote-driver:3.11.0 -org.seleniumhq.selenium:selenium-support:3.11.0 +org.seleniumhq.selenium:selenium-api:3.141.59 +org.seleniumhq.selenium:selenium-chrome-driver:3.141.59 +org.seleniumhq.selenium:selenium-remote-driver:3.141.59 +org.seleniumhq.selenium:selenium-support:3.141.59 org.slf4j:slf4j-api:1.8.0-alpha2 org.sonatype.plexus:plexus-cipher:1.4 org.sonatype.plexus:plexus-sec-dispatcher:1.4 diff --git a/gradle/dependency-locks/testRuntimeClasspath.lockfile b/gradle/dependency-locks/testRuntimeClasspath.lockfile index 051c13d9..34f2928b 100644 --- a/gradle/dependency-locks/testRuntimeClasspath.lockfile +++ b/gradle/dependency-locks/testRuntimeClasspath.lockfile @@ -1,30 +1,32 @@ # This is a Gradle generated file for dependency locking. # Manual edits can break the build and are not advised. # This file is expected to be part of source control. -com.amazonaws:aws-java-sdk-cloudformation:1.11.424 -com.amazonaws:aws-java-sdk-core:1.11.424 -com.amazonaws:aws-java-sdk-ec2:1.11.424 -com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.424 -com.amazonaws:aws-java-sdk-iam:1.11.424 -com.amazonaws:aws-java-sdk-kms:1.11.424 -com.amazonaws:aws-java-sdk-rds:1.11.424 -com.amazonaws:aws-java-sdk-s3:1.11.424 -com.amazonaws:aws-java-sdk-sts:1.11.424 -com.amazonaws:aws-java-sdk-support:1.11.424 -com.amazonaws:jmespath-java:1.11.424 -com.atlassian.performance.tools:aws-resources:1.4.0 -com.atlassian.performance.tools:concurrency:1.0.0 -com.atlassian.performance.tools:infrastructure:4.12.6 +com.amazonaws:aws-java-sdk-cloudformation:1.11.817 +com.amazonaws:aws-java-sdk-core:1.11.817 +com.amazonaws:aws-java-sdk-ec2:1.11.817 +com.amazonaws:aws-java-sdk-elasticloadbalancing:1.11.817 +com.amazonaws:aws-java-sdk-iam:1.11.817 +com.amazonaws:aws-java-sdk-kms:1.11.817 +com.amazonaws:aws-java-sdk-rds:1.11.817 +com.amazonaws:aws-java-sdk-s3:1.11.817 +com.amazonaws:aws-java-sdk-sts:1.11.817 +com.amazonaws:aws-java-sdk-support:1.11.817 +com.amazonaws:jmespath-java:1.11.817 +com.atlassian.data:random-data:1.4.3 +com.atlassian.performance.tools:aws-resources:1.7.0 +com.atlassian.performance.tools:concurrency:1.1.0 +com.atlassian.performance.tools:infrastructure:4.18.0 com.atlassian.performance.tools:io:1.2.0 -com.atlassian.performance.tools:jira-actions:3.3.0 -com.atlassian.performance.tools:jira-software-actions:1.3.1 -com.atlassian.performance.tools:jvm-tasks:1.0.1 -com.atlassian.performance.tools:ssh:2.3.0 -com.atlassian.performance.tools:virtual-users:3.6.4 -com.atlassian.performance.tools:workspace:2.0.0 +com.atlassian.performance.tools:jira-actions:3.16.0 +com.atlassian.performance.tools:jira-software-actions:1.3.3 +com.atlassian.performance.tools:jvm-tasks:1.2.1 +com.atlassian.performance.tools:ssh:2.4.0 +com.atlassian.performance.tools:virtual-users:3.13.0 +com.atlassian.performance.tools:workspace:2.0.2 +com.atlassian.performance:selenium-js:1.0.1 com.fasterxml.jackson.core:jackson-annotations:2.6.0 com.fasterxml.jackson.core:jackson-core:2.9.4 -com.fasterxml.jackson.core:jackson-databind:2.6.7.1 +com.fasterxml.jackson.core:jackson-databind:2.6.7.3 com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7 com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.4 com.github.stephenc.jcip:jcip-annotations:1.0-1 @@ -37,13 +39,13 @@ com.googlecode.javaewah:JavaEWAH:1.1.6 com.hierynomus:sshj:0.23.0 com.jcraft:jsch:0.1.54 com.jcraft:jzlib:1.1.3 -com.squareup.okhttp3:okhttp:3.9.1 -com.squareup.okio:okio:1.13.0 +com.squareup.okhttp3:okhttp:3.11.0 +com.squareup.okio:okio:1.14.0 com.sun.istack:istack-commons-runtime:3.0.5 com.sun.xml.fastinfoset:FastInfoset:1.2.13 com.typesafe:config:1.2.1 commons-cli:commons-cli:1.4 -commons-codec:commons-codec:1.10 +commons-codec:commons-codec:1.11 commons-io:commons-io:2.5 commons-logging:commons-logging:1.2 io.github.bonigarcia:webdrivermanager:1.7.1 @@ -52,7 +54,7 @@ javax.inject:javax.inject:1 javax.xml.bind:jaxb-api:2.3.0 joda-time:joda-time:2.8.1 junit:junit:4.12 -net.bytebuddy:byte-buddy:1.7.9 +net.bytebuddy:byte-buddy:1.8.15 net.i2p.crypto:eddsa:0.2.0 org.apache.commons:commons-compress:1.9 org.apache.commons:commons-csv:1.3 @@ -114,10 +116,10 @@ org.jetbrains:annotations:13.0 org.jsoup:jsoup:1.10.2 org.jvnet.staxex:stax-ex:1.7.8 org.rauschig:jarchivelib:0.7.1 -org.seleniumhq.selenium:selenium-api:3.11.0 -org.seleniumhq.selenium:selenium-chrome-driver:3.11.0 -org.seleniumhq.selenium:selenium-remote-driver:3.11.0 -org.seleniumhq.selenium:selenium-support:3.11.0 +org.seleniumhq.selenium:selenium-api:3.141.59 +org.seleniumhq.selenium:selenium-chrome-driver:3.141.59 +org.seleniumhq.selenium:selenium-remote-driver:3.141.59 +org.seleniumhq.selenium:selenium-support:3.141.59 org.slf4j:slf4j-api:1.8.0-alpha2 org.sonatype.plexus:plexus-cipher:1.4 org.sonatype.plexus:plexus-sec-dispatcher:1.4 diff --git a/lib/infrastructure-4.18.1-SNAPSHOT.jar b/lib/infrastructure-4.18.1-SNAPSHOT.jar new file mode 100644 index 00000000..85d8ed17 Binary files /dev/null and b/lib/infrastructure-4.18.1-SNAPSHOT.jar differ diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/NetworkFormula.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/NetworkFormula.kt index 9cef9a94..0b632e98 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/NetworkFormula.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/NetworkFormula.kt @@ -4,6 +4,7 @@ import com.amazonaws.services.cloudformation.model.Parameter import com.atlassian.performance.tools.aws.api.Aws import com.atlassian.performance.tools.aws.api.Investment import com.atlassian.performance.tools.aws.api.StackFormula +import com.atlassian.performance.tools.awsinfrastructure.api.Network import com.atlassian.performance.tools.io.api.readResourceText import org.apache.logging.log4j.LogManager diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/Infrastructure.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/Infrastructure.kt index 39c07280..5bb63a90 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/Infrastructure.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/Infrastructure.kt @@ -17,8 +17,8 @@ import java.net.URI import java.nio.file.Path import java.util.concurrent.Executors -class Infrastructure( - val virtualUsers: T, +class Infrastructure( + val virtualUsers: V, val jira: Jira, private val resultsTransport: Storage, val sshKey: SshKey diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/InfrastructureFormula.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/InfrastructureFormula.kt index acf80c91..727f5c53 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/InfrastructureFormula.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/InfrastructureFormula.kt @@ -1,7 +1,6 @@ package com.atlassian.performance.tools.awsinfrastructure.api import com.atlassian.performance.tools.aws.api.* -import com.atlassian.performance.tools.awsinfrastructure.Network import com.atlassian.performance.tools.awsinfrastructure.NetworkFormula import com.atlassian.performance.tools.awsinfrastructure.api.jira.DataCenterFormula import com.atlassian.performance.tools.awsinfrastructure.api.jira.JiraFormula diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/Network.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/Network.kt similarity index 61% rename from src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/Network.kt rename to src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/Network.kt index 2d1aaadf..829090ca 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/Network.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/Network.kt @@ -1,9 +1,9 @@ -package com.atlassian.performance.tools.awsinfrastructure +package com.atlassian.performance.tools.awsinfrastructure.api import com.amazonaws.services.ec2.model.Subnet import com.amazonaws.services.ec2.model.Vpc -internal class Network( +class Network( val vpc: Vpc, val subnet: Subnet -) \ No newline at end of file +) diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/database/AsyncInstallHook.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/database/AsyncInstallHook.kt new file mode 100644 index 00000000..6009fa4e --- /dev/null +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/database/AsyncInstallHook.kt @@ -0,0 +1,38 @@ +package com.atlassian.performance.tools.awsinfrastructure.api.database + +import com.atlassian.performance.tools.concurrency.api.submitWithLogContext +import com.atlassian.performance.tools.infrastructure.api.jira.install.HttpNode +import com.atlassian.performance.tools.infrastructure.api.jira.install.InstalledJira +import com.atlassian.performance.tools.infrastructure.api.jira.install.hook.PostInstallHook +import com.atlassian.performance.tools.infrastructure.api.jira.install.hook.PostInstallHooks +import com.atlassian.performance.tools.infrastructure.api.jira.install.hook.PreInstallHook +import com.atlassian.performance.tools.infrastructure.api.jira.install.hook.PreInstallHooks +import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports +import com.atlassian.performance.tools.ssh.api.SshConnection +import java.util.concurrent.Executors +import java.util.concurrent.Future + +/** + * Begins to run [hook] during [PreInstallHooks] and finishes during [PostInstallHooks] + */ +class AsyncInstallHook( + private val hook: PreInstallHook +) : PreInstallHook { + + override fun call(ssh: SshConnection, http: HttpNode, hooks: PreInstallHooks, reports: Reports) { + val thread = Executors.newSingleThreadExecutor() + val future = thread.submitWithLogContext("async-hook") { + hook.call(ssh, http, hooks, reports) + } + hooks.postInstall.insert(FutureHook(future)) + } +} + +private class FutureHook( + private val future: Future<*> +) : PostInstallHook { + + override fun call(ssh: SshConnection, jira: InstalledJira, hooks: PostInstallHooks, reports: Reports) { + future.get() + } +} diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/DataCenterFormula.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/DataCenterFormula.kt index f0ec2547..156da3a2 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/DataCenterFormula.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/DataCenterFormula.kt @@ -4,7 +4,7 @@ import com.amazonaws.services.cloudformation.model.Parameter import com.amazonaws.services.ec2.model.Tag import com.atlassian.performance.tools.aws.api.* import com.atlassian.performance.tools.awsinfrastructure.ApplicationStorageWrapper -import com.atlassian.performance.tools.awsinfrastructure.Network +import com.atlassian.performance.tools.awsinfrastructure.api.Network import com.atlassian.performance.tools.awsinfrastructure.NetworkFormula import com.atlassian.performance.tools.awsinfrastructure.TemplateBuilder import com.atlassian.performance.tools.awsinfrastructure.api.RemoteLocation @@ -22,9 +22,9 @@ import com.atlassian.performance.tools.awsinfrastructure.jira.home.SharedHomeFor import com.atlassian.performance.tools.concurrency.api.submitWithLogContext import com.atlassian.performance.tools.infrastructure.api.app.Apps import com.atlassian.performance.tools.infrastructure.api.database.Database +import com.atlassian.performance.tools.infrastructure.api.distribution.ProductDistribution import com.atlassian.performance.tools.infrastructure.api.jira.JiraHomeSource import com.atlassian.performance.tools.infrastructure.api.jira.JiraNodeConfig -import com.atlassian.performance.tools.infrastructure.api.distribution.ProductDistribution import com.atlassian.performance.tools.jvmtasks.api.TaskTimer.time import com.atlassian.performance.tools.ssh.api.Ssh import com.atlassian.performance.tools.ssh.api.SshHost @@ -110,7 +110,6 @@ class DataCenterFormula private constructor( aws: Aws ): ProvisionedJira = time("provision Jira Data Center") { logger.info("Setting up Jira...") - val executor = Executors.newCachedThreadPool( ThreadFactoryBuilder() .setNameFormat("data-center-provisioning-thread-%d") @@ -118,7 +117,7 @@ class DataCenterFormula private constructor( ) val network = overriddenNetwork ?: NetworkFormula(investment, aws).provision() val template = TemplateBuilder("2-nodes-dc.yaml").adaptTo(configs) - val stackProvisioning = executor.submitWithLogContext("provision stack") { + val stackProvisioning: Future = executor.submitWithLogContext("provision stack") { StackFormula( investment = investment, cloudformationTemplate = template, diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/Jira.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/Jira.kt index ca0e91d5..36aefb7d 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/Jira.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/Jira.kt @@ -5,8 +5,10 @@ import com.atlassian.performance.tools.concurrency.api.submitWithLogContext import com.atlassian.performance.tools.infrastructure.api.MeasurementSource import com.atlassian.performance.tools.infrastructure.api.jvm.jmx.JmxClient import com.atlassian.performance.tools.jvmtasks.api.TaskTimer.time +import com.atlassian.performance.tools.ssh.api.SshHost import com.google.common.util.concurrent.ThreadFactoryBuilder import java.net.URI +import java.nio.file.Paths import java.util.concurrent.Executors class Jira( @@ -30,4 +32,15 @@ class Jira( } override fun toString() = "Jira(address=$address)" -} \ No newline at end of file +} + +internal fun minimumFeatures( + uri: URI, + nodes: List +): Jira = Jira( + nodes, + RemoteLocation(SshHost("UNSUPPORTED", "UNSUPPORTED", Paths.get(".")), "UNSUPPORTED"), + null, + uri, + emptyList() +) diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/LegacyAwsInfrastructure.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/LegacyAwsInfrastructure.kt new file mode 100644 index 00000000..e3ffa5f8 --- /dev/null +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/LegacyAwsInfrastructure.kt @@ -0,0 +1,247 @@ +package com.atlassian.performance.tools.awsinfrastructure.api.jira + +import com.amazonaws.services.cloudformation.model.Parameter +import com.amazonaws.services.ec2.model.* +import com.amazonaws.services.ec2.model.Tag +import com.atlassian.performance.tools.aws.api.* +import com.atlassian.performance.tools.awsinfrastructure.NetworkFormula +import com.atlassian.performance.tools.awsinfrastructure.TemplateBuilder +import com.atlassian.performance.tools.awsinfrastructure.api.Network +import com.atlassian.performance.tools.awsinfrastructure.api.hardware.C4EightExtraLargeElastic +import com.atlassian.performance.tools.awsinfrastructure.api.hardware.Computer +import com.atlassian.performance.tools.awsinfrastructure.api.hardware.M4ExtraLargeElastic +import com.atlassian.performance.tools.awsinfrastructure.api.hardware.Volume +import com.atlassian.performance.tools.awsinfrastructure.api.loadbalancer.LoadBalancerFormula +import com.atlassian.performance.tools.awsinfrastructure.aws.TokenScrollingEc2 +import com.atlassian.performance.tools.infrastructure.api.jira.JiraNodeConfig +import com.atlassian.performance.tools.infrastructure.api.jira.install.HttpNode +import com.atlassian.performance.tools.infrastructure.api.jira.install.TcpNode +import com.atlassian.performance.tools.infrastructure.api.jira.start.hook.PreStartHooks +import com.atlassian.performance.tools.infrastructure.api.loadbalancer.LoadBalancer +import com.atlassian.performance.tools.infrastructure.api.loadbalancer.LoadBalancerPlan +import com.atlassian.performance.tools.infrastructure.api.network.HttpServerRoom +import com.atlassian.performance.tools.infrastructure.api.network.Networked +import com.atlassian.performance.tools.infrastructure.api.network.TcpServerRoom +import com.atlassian.performance.tools.ssh.api.Ssh +import com.atlassian.performance.tools.ssh.api.SshHost +import com.atlassian.performance.tools.workspace.api.RootWorkspace +import org.apache.logging.log4j.LogManager +import org.apache.logging.log4j.Logger +import java.nio.file.Path +import java.time.Duration +import java.util.* +import java.util.concurrent.CompletableFuture +import java.util.function.Supplier + +class LegacyAwsInfrastructure private constructor( + private val aws: Aws, + private val investment: Investment, + private val networking: Supplier, + private val workspace: Path, + private val jiraComputer: Computer, + private val jiraVolume: Volume, + private val jiraNodeConfigs: List, + private val databaseComputer: Computer, + private val databaseVolume: Volume, + private val provisioningTimout: Duration +) : Networked, AutoCloseable { + private val logger: Logger = LogManager.getLogger(this::class.java) + private val nonce = UUID.randomUUID().toString() + private val sshKey: SshKey by lazy { provisionKey() } + private val network: Network by lazy { networking.get() } + private val provisioning: ProvisionedStack by lazy { provisionStack() } + private val deprovisioning: CompletableFuture<*> by lazy { provisioning.release() } + + private fun provisionKey(): SshKey { + return SshKeyFormula(aws.ec2, workspace, nonce, investment.lifespan).provision() + } + + private fun provisionStack(): ProvisionedStack { + logger.info("Setting up Jira stack...") + val template = TemplateBuilder("2-nodes-dc.yaml").adaptTo(jiraNodeConfigs) + val stack = StackFormula( + investment = investment, + cloudformationTemplate = template, + parameters = listOf( + Parameter() + .withParameterKey("KeyName") + .withParameterValue(sshKey.remote.name), + Parameter() + .withParameterKey("InstanceProfile") + .withParameterValue(aws.shortTermStorageAccess()), + Parameter() + .withParameterKey("Ami") + .withParameterValue(aws.defaultAmi), + Parameter() + .withParameterKey("JiraInstanceType") + .withParameterValue(jiraComputer.instanceType.toString()), + Parameter() + .withParameterKey("JiraVolumeSize") + .withParameterValue(jiraVolume.size.toString()), + Parameter() + .withParameterKey("DatabaseInstanceType") + .withParameterValue(databaseComputer.instanceType.toString()), + Parameter() + .withParameterKey("DatabaseVolumeSize") + .withParameterValue(databaseVolume.size.toString()), + Parameter() + .withParameterKey("Vpc") + .withParameterValue(network.vpc.vpcId), + Parameter() + .withParameterKey("Subnet") + .withParameterValue(network.subnet.subnetId) + ), + aws = aws, + pollingTimeout = provisioningTimout + ).provision() + logger.info("Jira stack is provisioned, it will expire at ${stack.expiry}") + return stack + } + + override fun close() { + deprovisioning.get() + } + + override fun subnet(): String = network.subnet.cidrBlock + + val jiraNodesServerRoom : HttpServerRoom = StackJiraNodes() + val databaseServerRoom : TcpServerRoom = StackDatabase() + val sharedHomeServerRoom : TcpServerRoom = StackSharedHome() + + private fun listMachines() = provisioning.listMachines() + + fun balance(formula: LoadBalancerFormula): LoadBalancerPlan { + return object : LoadBalancerPlan { + override fun materialize(nodes: List, hooks: List): LoadBalancer { + val filter = Filter( + "network-interface.addresses.private-ip-address", + nodes.map { it.tcp.privateIp } + ) + val instances = TokenScrollingEc2(aws.ec2).findInstances(filter) + return formula + .provision(investment, instances, network.vpc, network.subnet, sshKey, aws) + .loadBalancer + } + } + } + + private inner class StackSharedHome : TcpServerRoom { + + override fun serveTcp(name: String): TcpNode { + val machine = listMachines().single { it.tags.contains(Tag("jpt-shared-home", "true")) } + val publicIp = machine.publicIpAddress + val ssh = Ssh(SshHost(publicIp, "ubuntu", sshKey.file.path), connectivityPatience = 4) + sshKey.file.facilitateSsh(publicIp) + ssh.newConnection().use { jiraComputer.setUp(it) } + return TcpNode( + publicIp, + machine.privateIpAddress, + 3306, + name, + ssh + ) + } + + override fun serveTcp(name: String, tcpPorts: List, udpPorts: List): TcpNode { + val ports = "TCP $tcpPorts and UDP $udpPorts" + throw Exception( + "It's unclear whether $ports are expected to be open to the public or privately." + + " All ports are open within the VPC." + ) + } + } + + private inner class StackDatabase : TcpServerRoom { + + override fun serveTcp(name: String, tcpPorts: List, udpPorts: List): TcpNode { + if (tcpPorts.singleOrNull() == 3306 && udpPorts.isEmpty()) { + return serveTcp(name) + } else { + throw Exception("The stack is not prepared for TCP $tcpPorts and UDP $udpPorts") + } + } + + override fun serveTcp(name: String): TcpNode { + val machine = listMachines().single { it.tags.contains(Tag("jpt-database", "true")) } + val publicIp = machine.publicIpAddress + val ssh = Ssh(SshHost(publicIp, "ubuntu", sshKey.file.path), connectivityPatience = 5) + sshKey.file.facilitateSsh(publicIp) + ssh.newConnection().use { databaseComputer.setUp(it) } + return TcpNode( + publicIp, + machine.privateIpAddress, + 3306, + name, + ssh + ) + } + } + + private inner class StackJiraNodes : HttpServerRoom { + + private val machines by lazy { + listMachines().filter { it.tags.contains(Tag("jpt-jira", "true")) } + } + private var nodesRequested = 0 + + override fun serveHttp(name: String): HttpNode { + val machine = + machines[nodesRequested++] // TODO looks like a yikes, relies on sync across `List` and `List` + val publicIp = machine.publicIpAddress + val ssh = Ssh(SshHost(publicIp, "ubuntu", sshKey.file.path), connectivityPatience = 5) + sshKey.file.facilitateSsh(publicIp) + ssh.newConnection().use { jiraComputer.setUp(it) } + val tcp = TcpNode( + publicIp, + machine.privateIpAddress, + 8080, + name, + ssh + ) + return HttpNode(tcp, "/", false) + } + } + + class Builder( + private var aws: Aws, + private var investment: Investment + ) { + private var networking: Supplier = Supplier { NetworkFormula(investment, aws).provision() } + private var jiraNodeConfigs: List = listOf(1, 2).map { JiraNodeConfig.Builder().build() } + private var jiraComputer: Computer = C4EightExtraLargeElastic() + private var jiraVolume: Volume = Volume(100) + private var databaseComputer: Computer = M4ExtraLargeElastic() + private var databaseVolume: Volume = Volume(100) + private var provisioningTimout: Duration = Duration.ofMinutes(30) + private var workspace: Path = RootWorkspace().currentTask.isolateTest(investment.reuseKey()).directory + + fun aws(aws: Aws) = apply { this.aws = aws } + fun networking(networking: Supplier) = apply { this.networking = networking } + fun investment(investment: Investment) = apply { this.investment = investment } + fun jiraNodeConfigs(jiraNodeConfigs: List) = + apply { this.jiraNodeConfigs = jiraNodeConfigs } + + fun jiraComputer(jiraComputer: Computer) = apply { this.jiraComputer = jiraComputer } + fun jiraVolume(jiraVolume: Volume) = apply { this.jiraVolume = jiraVolume } + fun databaseComputer(databaseComputer: Computer) = apply { this.databaseComputer = databaseComputer } + fun databaseVolume(databaseVolume: Volume) = apply { this.databaseVolume = databaseVolume } + fun provisioningTimout(provisioningTimout: Duration) = + apply { this.provisioningTimout = provisioningTimout } + + fun workspace(workspace: Path) = apply { this.workspace = workspace } + + fun build(): LegacyAwsInfrastructure = LegacyAwsInfrastructure( + aws = aws, + networking = networking, + investment = investment, + jiraNodeConfigs = jiraNodeConfigs, + jiraComputer = jiraComputer, + jiraVolume = jiraVolume, + databaseComputer = databaseComputer, + databaseVolume = databaseVolume, + provisioningTimout = provisioningTimout, + workspace = workspace + ) + } +} + diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/S3AppSourceInstall.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/S3AppSourceInstall.kt new file mode 100644 index 00000000..fe3ad03e --- /dev/null +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/S3AppSourceInstall.kt @@ -0,0 +1,28 @@ +package com.atlassian.performance.tools.awsinfrastructure.api.jira + +import com.atlassian.performance.tools.aws.api.Storage +import com.atlassian.performance.tools.awsinfrastructure.AwsCli +import com.atlassian.performance.tools.infrastructure.api.app.AppSource +import com.atlassian.performance.tools.infrastructure.api.app.Apps +import com.atlassian.performance.tools.infrastructure.api.jira.install.InstalledJira +import com.atlassian.performance.tools.infrastructure.api.jira.install.hook.PostInstallHook +import com.atlassian.performance.tools.infrastructure.api.jira.install.hook.PostInstallHooks +import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports +import com.atlassian.performance.tools.ssh.api.SshConnection + +class S3AppSourceInstall( + private val apps: List, + private val transport: Storage +) : PostInstallHook { + + override fun call(ssh: SshConnection, jira: InstalledJira, hooks: PostInstallHooks, reports: Reports) { + Apps(apps) + .listFiles() + .forEach { transport.upload(it) } + AwsCli().download( + transport.location, + ssh, + "${jira.home}/plugins/installed-plugins" + ) + } +} diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/StandaloneFormula.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/StandaloneFormula.kt index 9618ed31..7714e21e 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/StandaloneFormula.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/StandaloneFormula.kt @@ -4,7 +4,7 @@ import com.amazonaws.services.cloudformation.model.Parameter import com.amazonaws.services.ec2.model.Tag import com.atlassian.performance.tools.aws.api.* import com.atlassian.performance.tools.awsinfrastructure.ApplicationStorageWrapper -import com.atlassian.performance.tools.awsinfrastructure.Network +import com.atlassian.performance.tools.awsinfrastructure.api.Network import com.atlassian.performance.tools.awsinfrastructure.NetworkFormula import com.atlassian.performance.tools.awsinfrastructure.TemplateBuilder import com.atlassian.performance.tools.awsinfrastructure.api.RemoteLocation diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/StartedNode.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/StartedNode.kt index 335f269a..e43a429d 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/StartedNode.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/StartedNode.kt @@ -16,13 +16,14 @@ class StartedNode( private val monitoringProcesses: List, private val ssh: Ssh ) { + private val resultsDirectory = "results" fun gatherResults() { ssh.newConnection().use { shell -> monitoringProcesses.forEach { it.stop(shell) } val nodeResultsDirectory = "$resultsDirectory/'$name'" - val threadDumpsFolder = "thread-dumps" + val threadDumpsFolder = "thread-dumps" listOf( "mkdir -p $nodeResultsDirectory", "cp $unpackedProduct/logs/catalina.out $nodeResultsDirectory", diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/loadbalancer/ApacheEc2LoadBalancerFormula.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/loadbalancer/ApacheEc2LoadBalancerFormula.kt index 676b3799..319613bb 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/loadbalancer/ApacheEc2LoadBalancerFormula.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/loadbalancer/ApacheEc2LoadBalancerFormula.kt @@ -143,7 +143,7 @@ internal class ApacheProxyLoadBalancer( appendToApacheProxyConfiguration(connection, "Header add Set-Cookie \\\"ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/\\\" env=BALANCER_ROUTE_CHANGED") appendToApacheProxyConfiguration(connection, "") - nodes.forEachIndexed { index, uri -> appendToApacheProxyConfiguration(connection, "\tBalancerMember http://${uri.host}:${uri.port} route=$index")} + nodes.forEachIndexed { index, uri -> appendToApacheProxyConfiguration(connection, "\tBalancerMember http://${uri.host}:${uri.port} route=$index") } appendToApacheProxyConfiguration(connection, "\n") appendToApacheProxyConfiguration(connection, "ProxyPass / balancer://mycluster/ stickysession=ROUTEID") diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/Ec2VirtualUsersFormula.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/Ec2VirtualUsersFormula.kt index 694ae9c7..85fd3680 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/Ec2VirtualUsersFormula.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/Ec2VirtualUsersFormula.kt @@ -3,7 +3,7 @@ package com.atlassian.performance.tools.awsinfrastructure.api.virtualusers import com.amazonaws.services.ec2.model.IamInstanceProfileSpecification import com.amazonaws.services.ec2.model.InstanceType import com.atlassian.performance.tools.aws.api.* -import com.atlassian.performance.tools.awsinfrastructure.Network +import com.atlassian.performance.tools.awsinfrastructure.api.Network import com.atlassian.performance.tools.awsinfrastructure.virtualusers.UbuntuVirtualUsersRuntime import com.atlassian.performance.tools.infrastructure.api.browser.Browser import com.atlassian.performance.tools.infrastructure.api.browser.Chrome diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/MulticastVirtualUsersFormula.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/MulticastVirtualUsersFormula.kt index 3be4e32e..89798fc5 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/MulticastVirtualUsersFormula.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/MulticastVirtualUsersFormula.kt @@ -1,7 +1,7 @@ package com.atlassian.performance.tools.awsinfrastructure.api.virtualusers import com.atlassian.performance.tools.aws.api.* -import com.atlassian.performance.tools.awsinfrastructure.Network +import com.atlassian.performance.tools.awsinfrastructure.api.Network import com.atlassian.performance.tools.concurrency.api.submitWithLogContext import com.atlassian.performance.tools.infrastructure.api.browser.Browser import com.atlassian.performance.tools.infrastructure.api.browser.Chrome diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/StackVirtualUsersFormula.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/StackVirtualUsersFormula.kt index 276b14d7..7fa721ea 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/StackVirtualUsersFormula.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/virtualusers/StackVirtualUsersFormula.kt @@ -3,7 +3,7 @@ package com.atlassian.performance.tools.awsinfrastructure.api.virtualusers import com.amazonaws.services.cloudformation.model.Parameter import com.amazonaws.services.ec2.model.Tag import com.atlassian.performance.tools.aws.api.* -import com.atlassian.performance.tools.awsinfrastructure.Network +import com.atlassian.performance.tools.awsinfrastructure.api.Network import com.atlassian.performance.tools.awsinfrastructure.NetworkFormula import com.atlassian.performance.tools.awsinfrastructure.virtualusers.UbuntuVirtualUsersRuntime import com.atlassian.performance.tools.infrastructure.api.browser.Browser diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/aws/TokenScrollingEc2.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/aws/TokenScrollingEc2.kt new file mode 100644 index 00000000..f5763e12 --- /dev/null +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/aws/TokenScrollingEc2.kt @@ -0,0 +1,49 @@ +package com.atlassian.performance.tools.awsinfrastructure.aws + +import com.amazonaws.services.ec2.AmazonEC2 +import com.amazonaws.services.ec2.model.DescribeInstancesRequest +import com.amazonaws.services.ec2.model.Filter +import com.amazonaws.services.ec2.model.Instance +import com.amazonaws.services.ec2.model.InstanceStateName.* +import com.atlassian.performance.tools.aws.api.ScrollingEc2 + +/** + * Scrolls through batches of AWS EC2 instances using "page token". + */ +internal class TokenScrollingEc2( + private val ec2: AmazonEC2 +) : ScrollingEc2 { + override fun scrollThroughInstances( + vararg filters: Filter, + batchAction: (List) -> Unit + ) { + var token: String? = null + do { + val response = ec2.describeInstances( + DescribeInstancesRequest() + .withFilters(filters.toList()) + .withNextToken(token) + ) + val batch = response + .reservations + .flatMap { it.instances } + batchAction(batch) + token = response.nextToken + } while (token != null) + } + + override fun findInstances( + vararg filters: Filter + ): List { + val instances = mutableListOf() + scrollThroughInstances(*filters) { batch -> + instances += batch + } + return instances + } + + override fun allocated(): Filter = Filter( + "instance-state-name", + listOf(Pending, Running, ShuttingDown).map { it.toString() } + ) +} \ No newline at end of file diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/host/TcpHostFormula.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/host/TcpHostFormula.kt new file mode 100644 index 00000000..edbc925f --- /dev/null +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/host/TcpHostFormula.kt @@ -0,0 +1,127 @@ +package com.atlassian.performance.tools.awsinfrastructure.host + +import com.amazonaws.services.cloudformation.model.Parameter +import com.amazonaws.services.ec2.model.InstanceType +import com.atlassian.performance.tools.aws.api.Aws +import com.atlassian.performance.tools.aws.api.Investment +import com.atlassian.performance.tools.aws.api.SshKey +import com.atlassian.performance.tools.aws.api.StackFormula +import com.atlassian.performance.tools.awsinfrastructure.api.Network +import com.atlassian.performance.tools.awsinfrastructure.api.hardware.Computer +import com.atlassian.performance.tools.awsinfrastructure.api.hardware.EbsEc2Instance +import com.atlassian.performance.tools.awsinfrastructure.api.hardware.Volume +import com.atlassian.performance.tools.infrastructure.api.jira.install.TcpNode +import com.atlassian.performance.tools.io.api.readResourceText +import com.atlassian.performance.tools.ssh.api.Ssh +import com.atlassian.performance.tools.ssh.api.SshHost +import java.time.Duration +import java.util.function.Supplier + +class TcpHostFormula private constructor( + private val port: Int, + private val name: String, + private val network: Network, + private val computer: Computer, + private val volume: Volume, + private val aws: Aws, + private val sshKey: SshKey, + private val investment: Investment, + private val stackTimeout: Duration +) : Supplier { + + override fun get(): TcpNode { + val stack = StackFormula( + investment = investment, + cloudformationTemplate = readResourceText("aws/ssh-tcp-host.yaml"), + parameters = listOf( + Parameter() + .withParameterKey("TcpPort") + .withParameterValue(port.toString()), + Parameter() + .withParameterKey("LogicalName") + .withParameterValue(name), + Parameter() + .withParameterKey("KeyName") + .withParameterValue(sshKey.remote.name), + Parameter() + .withParameterKey("Ami") + .withParameterValue(aws.defaultAmi), + Parameter() + .withParameterKey("InstanceType") + .withParameterValue(computer.instanceType.toString()), + Parameter() + .withParameterKey("VolumeSize") + .withParameterValue(volume.size.toString()), + Parameter() + .withParameterKey("Vpc") + .withParameterValue(network.vpc.vpcId), + Parameter() + .withParameterKey("Subnet") + .withParameterValue(network.subnet.subnetId) + ), + aws = aws, + pollingTimeout = stackTimeout + ).provision() + val machine = stack.listMachines().single() + return TcpNode( + ssh = Ssh( + host = SshHost(machine.publicIpAddress, "ubuntu", sshKey.file.path), + connectivityPatience = 4 + ), + publicIp = machine.publicIpAddress, + privateIp = machine.privateIpAddress, + port = port, + name = name + ) + } + + class Builder( + private var aws: Aws, + private var sshKey: SshKey, + private var network: Network + ) { + + constructor( + formula: TcpHostFormula + ) : this( + formula.aws, + formula.sshKey, + formula.network + ) { + port = formula.port + name = formula.name + computer = formula.computer + volume = formula.volume + stackTimeout = formula.stackTimeout + } + + private var port: Int = 80 + private var name: String = "host" + private var computer: Computer = EbsEc2Instance(InstanceType.T2Nano) + private var volume: Volume = Volume(10) + private var investment: Investment = Investment("Ad hoc provisioning", Duration.ofMinutes(30)) + private var stackTimeout: Duration = Duration.ofMinutes(2) + + fun port(port: Int) = apply { this.port = port } + fun name(name: String) = apply { this.name = name } + fun network(network: Network) = apply { this.network = network } + fun computer(computer: Computer) = apply { this.computer = computer } + fun volume(volume: Volume) = apply { this.volume = volume } + fun aws(aws: Aws) = apply { this.aws = aws } + fun sshKey(sshKey: SshKey) = apply { this.sshKey = sshKey } + fun investment(investment: Investment) = apply { this.investment = investment } + fun stackTimeout(stackTimeout: Duration) = apply { this.stackTimeout = stackTimeout } + + fun build() = TcpHostFormula( + port, + name, + network, + computer, + volume, + aws, + sshKey, + investment, + stackTimeout + ) + } +} diff --git a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/jira/StandaloneNodeFormula.kt b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/jira/StandaloneNodeFormula.kt index 2a500418..3e9e521e 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/jira/StandaloneNodeFormula.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/awsinfrastructure/jira/StandaloneNodeFormula.kt @@ -5,6 +5,7 @@ import com.atlassian.performance.tools.awsinfrastructure.AwsCli import com.atlassian.performance.tools.awsinfrastructure.api.hardware.Computer import com.atlassian.performance.tools.concurrency.api.submitWithLogContext import com.atlassian.performance.tools.infrastructure.api.Sed +import com.atlassian.performance.tools.infrastructure.api.database.DatabaseIpConfig import com.atlassian.performance.tools.infrastructure.api.jira.JiraGcLog import com.atlassian.performance.tools.infrastructure.api.jira.JiraHomeSource import com.atlassian.performance.tools.infrastructure.api.jira.JiraNodeConfig diff --git a/src/main/resources/aws/2-nodes-dc-no-db.yaml b/src/main/resources/aws/2-nodes-dc-no-db.yaml new file mode 100644 index 00000000..8a86c6b0 --- /dev/null +++ b/src/main/resources/aws/2-nodes-dc-no-db.yaml @@ -0,0 +1,146 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Serves a Jira Data Center cluster with Jira nodes and shared home +Parameters: + KeyName: + Description: Name of an existing EC2 KeyPair to enable SSH access to the instance + Type: AWS::EC2::KeyPair::KeyName + ConstraintDescription: must be the name of an existing EC2 KeyPair. + InstanceProfile: + Type: String + Ami: + Type: String + JiraInstanceType: + Type: String + JiraVolumeSize: + Type: Number + Vpc: + Type: String + Subnet: + Type: String +Resources: + jira1: + Type: AWS::EC2::Instance + Properties: + SecurityGroupIds: + - Ref: SshSecurityGroup + - Ref: RmiSecurityGroup + - Ref: TomcatSecurityGroup + - Ref: SubnetSecurityGroup + InstanceType: !Ref JiraInstanceType + SubnetId: + Ref: Subnet + KeyName: + Ref: KeyName + ImageId: !Ref Ami + Tags: + - Key: jpt-jira + Value: true + IamInstanceProfile: !Ref InstanceProfile + BlockDeviceMappings: + - DeviceName: /dev/sda1 + Ebs: + VolumeSize: !Ref JiraVolumeSize + VolumeType: gp2 + jira2: + Type: AWS::EC2::Instance + Properties: + SecurityGroupIds: + - Ref: SshSecurityGroup + - Ref: RmiSecurityGroup + - Ref: TomcatSecurityGroup + - Ref: SubnetSecurityGroup + InstanceType: !Ref JiraInstanceType + SubnetId: + Ref: Subnet + KeyName: + Ref: KeyName + ImageId: !Ref Ami + Tags: + - Key: jpt-jira + Value: true + IamInstanceProfile: !Ref InstanceProfile + BlockDeviceMappings: + - DeviceName: /dev/sda1 + Ebs: + VolumeSize: !Ref JiraVolumeSize + VolumeType: gp2 + SharedHome: + Type: AWS::EC2::Instance + Properties: + SecurityGroupIds: + - Ref: SshSecurityGroup + - Ref: SubnetSecurityGroup + InstanceType: !Ref JiraInstanceType + SubnetId: + Ref: Subnet + KeyName: + Ref: KeyName + ImageId: !Ref Ami + Tags: + - Key: jpt-shared-home + Value: true + IamInstanceProfile: !Ref InstanceProfile + BlockDeviceMappings: + - DeviceName: /dev/sda1 + Ebs: + VolumeSize: !Ref JiraVolumeSize + VolumeType: gp2 + SshSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + VpcId: + Ref: Vpc + GroupDescription: Enables SSH access + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: 22 + ToPort: 22 + CidrIp: 0.0.0.0/0 + RmiSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + VpcId: + Ref: Vpc + GroupDescription: Enables RMI access + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: 40001 + ToPort: 40001 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 40011 + ToPort: 40011 + CidrIp: 0.0.0.0/0 + TomcatSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + VpcId: + Ref: Vpc + GroupDescription: Enables Tomcat HTTP access + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: 8080 + ToPort: 8080 + CidrIp: 0.0.0.0/0 + MountTargetSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + VpcId: + Ref: Vpc + GroupDescription: Security group for mount target + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: 2049 + ToPort: 2049 + CidrIp: 0.0.0.0/0 + SubnetSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + VpcId: + Ref: Vpc + GroupDescription: Enable communication between nodes + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: 0 + ToPort: 65535 + CidrIp: 10.0.0.0/24 diff --git a/src/main/resources/aws/2-nodes-dc.yaml b/src/main/resources/aws/2-nodes-dc.yaml index aae7a48d..08140462 100644 --- a/src/main/resources/aws/2-nodes-dc.yaml +++ b/src/main/resources/aws/2-nodes-dc.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: 2010-09-09 -Description: Serves a Jira Data Center cluster without a load balancer +Description: Serves a Jira Data Center cluster with Jira nodes, shared home and a MySQL database Parameters: KeyName: Description: Name of an existing EC2 KeyPair to enable SSH access to the instance diff --git a/src/main/resources/aws/ssh-tcp-host.yaml b/src/main/resources/aws/ssh-tcp-host.yaml new file mode 100644 index 00000000..e68cc1aa --- /dev/null +++ b/src/main/resources/aws/ssh-tcp-host.yaml @@ -0,0 +1,60 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: A single-port TCP host with SSH access. +Parameters: + KeyName: + Description: Name of an existing EC2 KeyPair to enable SSH access to the instance + Type: AWS::EC2::KeyPair::KeyName + ConstraintDescription: must be the name of an existing EC2 KeyPair. + TcpPort: + Type: Number + Ami: + Type: String + InstanceType: + Type: String + VolumeSize: + Type: Number + Vpc: + Type: String + Subnet: + Type: String + LogicalName: + Type: String +Resources: + Host: + Type: AWS::EC2::Instance + Properties: + InstanceType: !Ref InstanceType + SubnetId: !Ref Subnet + SecurityGroupIds: + - Ref: HostSecurityGroup + - Ref: SshSecurityGroup + KeyName: !Ref KeyName + ImageId: !Ref Ami + BlockDeviceMappings: + - DeviceName: /dev/sda1 + Ebs: + VolumeSize: !Ref VolumeSize + VolumeType: gp2 + Tags: + - Key: LogicalName + Value: !Ref LogicalName + SshSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + VpcId: !Ref Vpc + GroupDescription: Enables SSH access + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: 22 + ToPort: 22 + CidrIp: 0.0.0.0/0 + HostSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + VpcId: !Ref Vpc + GroupDescription: Enables host access + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: !Ref TcpPort + ToPort: !Ref TcpPort + CidrIp: 0.0.0.0/0 diff --git a/src/test/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/HooksDataCenterFormulaIT.kt b/src/test/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/HooksDataCenterFormulaIT.kt new file mode 100644 index 00000000..a1bffff3 --- /dev/null +++ b/src/test/kotlin/com/atlassian/performance/tools/awsinfrastructure/api/jira/HooksDataCenterFormulaIT.kt @@ -0,0 +1,115 @@ +package com.atlassian.performance.tools.awsinfrastructure.api.jira + +import com.atlassian.performance.tools.aws.api.Investment +import com.atlassian.performance.tools.awsinfrastructure.IntegrationTestRuntime +import com.atlassian.performance.tools.awsinfrastructure.api.hardware.M5ExtraLargeEphemeral +import com.atlassian.performance.tools.awsinfrastructure.api.hardware.Volume +import com.atlassian.performance.tools.awsinfrastructure.api.loadbalancer.ApacheEc2LoadBalancerFormula +import com.atlassian.performance.tools.infrastructure.api.database.DockerMysqlServer +import com.atlassian.performance.tools.infrastructure.api.dataset.HttpDatasetPackage +import com.atlassian.performance.tools.infrastructure.api.distribution.PublicJiraSoftwareDistribution +import com.atlassian.performance.tools.infrastructure.api.jira.JiraHomePackage +import com.atlassian.performance.tools.infrastructure.api.jira.JiraLaunchTimeouts +import com.atlassian.performance.tools.infrastructure.api.jira.install.ParallelInstallation +import com.atlassian.performance.tools.infrastructure.api.jira.install.hook.PreInstallHooks +import com.atlassian.performance.tools.infrastructure.api.jira.instance.JiraDataCenterPlan +import com.atlassian.performance.tools.infrastructure.api.jira.instance.JiraNodePlan +import com.atlassian.performance.tools.infrastructure.api.jira.instance.PreInstanceHooks +import com.atlassian.performance.tools.infrastructure.api.jira.sharedhome.NfsSharedHome +import com.atlassian.performance.tools.infrastructure.api.jira.start.JiraLaunchScript +import com.atlassian.performance.tools.infrastructure.api.jira.start.hook.RestUpgrade +import com.atlassian.performance.tools.infrastructure.api.jvm.AdoptOpenJDK +import org.assertj.core.api.Assertions.assertThat +import org.junit.Test +import java.net.URI +import java.nio.file.Files +import java.time.Duration + +class HooksDataCenterFormulaIT { + + private val workspace = IntegrationTestRuntime.taskWorkspace.isolateTest(javaClass.simpleName).directory + private val datasetUri = URI("https://s3-eu-west-1.amazonaws.com/") + .resolve("jpt-custom-datasets-storage-a008820-datasetbucket-1sjxdtrv5hdhj/") + .resolve("dataset-f8dba866-9d1b-492e-b76c-f4a78ac3958c/") + private val mysql = HttpDatasetPackage( + uri = datasetUri.resolve("database.tar.bz2"), + downloadTimeout = Duration.ofMinutes(6) + ) + private val jiraHome = JiraHomePackage( + HttpDatasetPackage( + uri = datasetUri.resolve("jirahome.tar.bz2"), + downloadTimeout = Duration.ofMinutes(6) + ) + ) + private val infra: LegacyAwsInfrastructure = LegacyAwsInfrastructure.Builder( + IntegrationTestRuntime.aws, + Investment("Test Server provisioning hook API", Duration.ofMinutes(30)) + ) + .databaseComputer(M5ExtraLargeEphemeral()) + .databaseVolume(Volume(100)) + .workspace(workspace) + .build() + + @Test + fun shouldProvisionDc() { + // given + val database = DockerMysqlServer.Builder(infra.databaseServerRoom, mysql) + .source( + HttpDatasetPackage( + uri = datasetUri.resolve("database.tar.bz2"), + downloadTimeout = Duration.ofMinutes(6) + ) + ) + .build() + val upgrade = RestUpgrade(JiraLaunchTimeouts.Builder().build(), "admin", "admin") + val installation = ParallelInstallation(jiraHome, PublicJiraSoftwareDistribution("8.13.0"), AdoptOpenJDK()) + val nodePlans = (1..2).map { + JiraNodePlan.Builder(infra.jiraNodesServerRoom) + .installation(installation) + .start(JiraLaunchScript()) + .hooks(PreInstallHooks.default().also { it.postStart.insert(upgrade) }) + .build() + } + val dcPlan = JiraDataCenterPlan.Builder(nodePlans, infra.balance(ApacheEc2LoadBalancerFormula())) + .instanceHooks( + PreInstanceHooks.default() + .also { it.insert(database) } + .also { it.insert(NfsSharedHome(jiraHome, infra.sharedHomeServerRoom, infra)) } + ) + .build() + + // when + val dataCenter = dcPlan.materialize() + + // then + dataCenter.nodes.forEach { node -> + val installed = node.installed + val serverXml = installed + .installation + .resolve("conf/server.xml") + .download(Files.createTempFile("downloaded-config", ".xml")) + assertThat(serverXml.readText()).contains(" + ssh.execute("wget ${dataCenter.address}") + } + } + val reports = dcPlan.report().downloadTo(workspace) + assertThat(reports).isDirectory() + val fileTree = reports + .walkTopDown() + .map { reports.toPath().relativize(it.toPath()) } + .toList() + assertThat(fileTree.map { it.toString() }).contains( + "jira-node-1/atlassian-jira-software-8.13.0-standalone/logs/catalina.out", + "jira-node-1/~/jpt-jstat.log", + "jira-node-2/atlassian-jira-software-8.13.0-standalone/logs/catalina.out" + ) + assertThat(fileTree.filter { it.fileName.toString() == "atlassian-jira.log" }) + .`as`("Jira log from $fileTree") + .isNotEmpty + assertThat(fileTree.filter { it.fileName.toString().startsWith("atlassian-jira-gc") }) + .`as`("GC logs from $fileTree") + .isNotEmpty + } +}