Skip to content

Commit

Permalink
JPERF-273 Move hook functionality out of API. It's not ready yet
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrzaslewicz committed Sep 13, 2023
1 parent 0f871b7 commit cacb5f0
Show file tree
Hide file tree
Showing 45 changed files with 115 additions and 106 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.atlassian.performance.tools.infrastructure.database

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.hookapi.jira.install.hook.PostInstallHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PostInstallHooks
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.jvmtasks.api.IdempotentAction
import com.atlassian.performance.tools.jvmtasks.api.StaticBackoff
import com.atlassian.performance.tools.ssh.api.SshConnection
import java.time.Duration
import java.time.Duration.ofSeconds

/**
Expand All @@ -28,4 +27,4 @@ class MysqlFiveConnector : PostInstallHook {
ssh.execute("tar -xzf mysql-connector-java-5.1.40.tar.gz")
ssh.execute("cp mysql-connector-java-5.1.40/mysql-connector-java-5.1.40-bin.jar ${jira.installation.path}/lib")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package com.atlassian.performance.tools.infrastructure.database

import com.atlassian.performance.tools.infrastructure.api.jira.install.InstalledJira
import com.atlassian.performance.tools.infrastructure.api.jira.install.TcpNode
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.hookapi.jira.install.hook.PostInstallHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PostInstallHooks
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.api.jira.report.StaticReport
import com.atlassian.performance.tools.infrastructure.api.os.RemotePath
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.atlassian.performance.tools.infrastructure.api.database
package com.atlassian.performance.tools.infrastructure.hookapi.database

import com.atlassian.performance.tools.infrastructure.api.Sed
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.hookapi.jira.install.hook.PostInstallHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PostInstallHooks
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.api.jira.report.StaticReport
import com.atlassian.performance.tools.ssh.api.SshConnection
Expand All @@ -27,4 +27,4 @@ class DatabaseIpConfig(
file = dbConfigXml
)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
package com.atlassian.performance.tools.infrastructure.api.database
package com.atlassian.performance.tools.infrastructure.hookapi.database

import com.atlassian.performance.tools.infrastructure.api.dataset.DatasetPackage
import com.atlassian.performance.tools.infrastructure.api.jira.install.TcpNode
import com.atlassian.performance.tools.infrastructure.api.jira.install.hook.PreInstallHooks
import com.atlassian.performance.tools.infrastructure.api.jira.instance.JiraInstance
import com.atlassian.performance.tools.infrastructure.api.jira.instance.PostInstanceHook
import com.atlassian.performance.tools.infrastructure.api.jira.instance.PostInstanceHooks
import com.atlassian.performance.tools.infrastructure.api.jira.instance.PreInstanceHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PreInstallHooks
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.api.network.TcpServerRoom
import com.atlassian.performance.tools.infrastructure.api.os.Ubuntu
import com.atlassian.performance.tools.infrastructure.database.*
import com.atlassian.performance.tools.infrastructure.database.Mysql
import com.atlassian.performance.tools.infrastructure.database.SshMysqlClient
import com.atlassian.performance.tools.infrastructure.hookapi.jira.instance.JiraInstance
import com.atlassian.performance.tools.infrastructure.hookapi.jira.instance.PostInstanceHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.instance.PostInstanceHooks
import com.atlassian.performance.tools.infrastructure.hookapi.jira.instance.PreInstanceHook
import com.atlassian.performance.tools.ssh.api.Ssh
import com.atlassian.performance.tools.ssh.api.SshConnection

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.atlassian.performance.tools.infrastructure.api.jira.install.hook
package com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook

import com.atlassian.performance.tools.infrastructure.api.jira.install.HttpNode
import com.atlassian.performance.tools.infrastructure.api.jira.report.Report
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.api.jira.start.StartedJira
import com.atlassian.performance.tools.infrastructure.api.jira.start.hook.PostStartHook
import com.atlassian.performance.tools.infrastructure.api.jira.start.hook.PostStartHooks
import com.atlassian.performance.tools.infrastructure.hookapi.jira.start.hook.PostStartHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.start.hook.PostStartHooks
import com.atlassian.performance.tools.ssh.api.SshConnection
import java.net.URI

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.atlassian.performance.tools.infrastructure.api.jira.install.hook
package com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook

import com.atlassian.performance.tools.infrastructure.api.jira.install.InstalledJira
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PostInstallHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PostInstallHooks
import com.atlassian.performance.tools.ssh.api.SshConnection

class DisabledAutoBackup : PostInstallHook {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.atlassian.performance.tools.infrastructure.api.jira.install.hook
package com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook

import com.atlassian.performance.tools.infrastructure.api.jira.install.InstalledJira
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PostInstallHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PostInstallHooks
import com.atlassian.performance.tools.ssh.api.SshConnection

class JiraHomeProperty : PostInstallHook {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.atlassian.performance.tools.infrastructure.api.jira.install.hook
package com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook

import com.atlassian.performance.tools.infrastructure.api.jira.install.InstalledJira
import com.atlassian.performance.tools.infrastructure.api.jira.report.Report
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.atlassian.performance.tools.infrastructure.api.jira.install.hook
package com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook

import com.atlassian.performance.tools.infrastructure.api.jira.JiraGcLog
import com.atlassian.performance.tools.infrastructure.api.jira.JiraNodeConfig
import com.atlassian.performance.tools.infrastructure.api.jira.SetenvSh
import com.atlassian.performance.tools.infrastructure.api.jira.install.InstalledJira
import com.atlassian.performance.tools.infrastructure.api.jira.report.FileListing
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PostInstallHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PostInstallHooks
import com.atlassian.performance.tools.ssh.api.SshConnection

class JvmConfig(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.atlassian.performance.tools.infrastructure.api.jira.install.hook
package com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook

import com.atlassian.performance.tools.infrastructure.Iostat
import com.atlassian.performance.tools.infrastructure.api.jira.install.InstalledJira
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.api.jira.start.StartedJira
import com.atlassian.performance.tools.infrastructure.api.jira.start.hook.PostStartHook
import com.atlassian.performance.tools.infrastructure.api.jira.start.hook.PostStartHooks
import com.atlassian.performance.tools.infrastructure.api.os.OsMetric
import com.atlassian.performance.tools.infrastructure.api.os.Ubuntu
import com.atlassian.performance.tools.infrastructure.api.os.Vmstat
import com.atlassian.performance.tools.infrastructure.hookapi.jira.start.hook.PostStartHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.start.hook.PostStartHooks
import com.atlassian.performance.tools.infrastructure.jira.report.RemoteMonitoringProcessReport
import com.atlassian.performance.tools.ssh.api.SshConnection

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.atlassian.performance.tools.infrastructure.api.jira.install.hook
package com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook

import com.atlassian.performance.tools.infrastructure.api.jira.install.InstalledJira
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.atlassian.performance.tools.infrastructure.api.jira.install.hook
package com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook

import com.atlassian.performance.tools.infrastructure.api.jira.JiraNodeConfig
import com.atlassian.performance.tools.infrastructure.api.jira.install.InstalledJira
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.api.jira.start.hook.PreStartHooks
import com.atlassian.performance.tools.infrastructure.hookapi.jira.start.hook.PreStartHooks
import com.atlassian.performance.tools.infrastructure.jira.install.hook.ProfilerHook
import com.atlassian.performance.tools.infrastructure.jira.install.hook.SplunkForwarderHook
import com.atlassian.performance.tools.ssh.api.SshConnection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.atlassian.performance.tools.infrastructure.api.jira.install.hook
package com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook

import com.atlassian.performance.tools.infrastructure.api.jira.install.HttpNode
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.ssh.api.SshConnection
import org.apache.http.HttpHost

/**
* Intercepts a call before Jira is installed.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.atlassian.performance.tools.infrastructure.api.jira.install.hook
package com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook

import com.atlassian.performance.tools.infrastructure.api.jira.install.HttpNode
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.atlassian.performance.tools.infrastructure.api.jira.install.hook
package com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook

import com.atlassian.performance.tools.infrastructure.api.jira.install.HttpNode
import com.atlassian.performance.tools.infrastructure.api.jira.report.FileListing
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PreInstallHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PreInstallHooks
import com.atlassian.performance.tools.ssh.api.SshConnection

class SystemLog : PreInstallHook {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.atlassian.performance.tools.infrastructure.api.jira.instance
package com.atlassian.performance.tools.infrastructure.hookapi.jira.instance

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.hookapi.jira.install.hook.PostInstallHook
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PostInstallHooks
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.jira.instance.ClusterProperties
import com.atlassian.performance.tools.ssh.api.SshConnection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.atlassian.performance.tools.infrastructure.api.jira.instance
package com.atlassian.performance.tools.infrastructure.hookapi.jira.instance

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.report.Reports
import com.atlassian.performance.tools.infrastructure.api.jira.start.StartedJira
import com.atlassian.performance.tools.infrastructure.api.loadbalancer.ApacheProxyPlan
import com.atlassian.performance.tools.infrastructure.api.loadbalancer.LoadBalancerPlan
import com.atlassian.performance.tools.infrastructure.api.network.HttpServerRoom
import com.atlassian.performance.tools.infrastructure.hookapi.loadbalancer.ApacheProxyPlan
import com.atlassian.performance.tools.infrastructure.hookapi.loadbalancer.LoadBalancerPlan
import com.atlassian.performance.tools.infrastructure.hookapi.network.HttpServerRoom
import java.time.Duration
import kotlin.streams.asStream
import kotlin.streams.toList
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.atlassian.performance.tools.infrastructure.api.jira.instance
package com.atlassian.performance.tools.infrastructure.hookapi.jira.instance

import com.atlassian.performance.tools.infrastructure.api.jira.install.HttpNode
import com.atlassian.performance.tools.infrastructure.api.jira.start.StartedJira
import java.net.URI

interface JiraInstance {
val address: HttpNode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.atlassian.performance.tools.infrastructure.api.jira.instance
package com.atlassian.performance.tools.infrastructure.hookapi.jira.instance

import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports

interface JiraInstancePlan {
fun materialize(): JiraInstance
fun report(): Reports
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.atlassian.performance.tools.infrastructure.api.jira.instance
package com.atlassian.performance.tools.infrastructure.hookapi.jira.instance

import com.atlassian.performance.tools.infrastructure.api.distribution.PublicJiraSoftwareDistribution
import com.atlassian.performance.tools.infrastructure.api.jira.EmptyJiraHome
import com.atlassian.performance.tools.infrastructure.api.jira.install.JiraInstallation
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.hookapi.jira.install.hook.PreInstallHooks
import com.atlassian.performance.tools.infrastructure.api.jira.start.JiraLaunchScript
import com.atlassian.performance.tools.infrastructure.api.jira.start.JiraStart
import com.atlassian.performance.tools.infrastructure.api.jvm.OracleJDK
import com.atlassian.performance.tools.infrastructure.api.network.HttpServerRoom
import com.atlassian.performance.tools.infrastructure.hookapi.network.HttpServerRoom
import com.atlassian.performance.tools.infrastructure.jira.install.hook.HookedJiraInstallation
import com.atlassian.performance.tools.infrastructure.jira.start.hook.HookedJiraStart
import net.jcip.annotations.NotThreadSafe
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.atlassian.performance.tools.infrastructure.api.jira.instance
package com.atlassian.performance.tools.infrastructure.hookapi.jira.instance

import com.atlassian.performance.tools.infrastructure.api.jira.install.HttpNode
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import com.atlassian.performance.tools.infrastructure.api.jira.start.StartedJira
import com.atlassian.performance.tools.infrastructure.api.network.HttpServerRoom
import com.atlassian.performance.tools.infrastructure.hookapi.network.HttpServerRoom

class JiraServerPlan private constructor(
private val plan: JiraNodePlan,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.atlassian.performance.tools.infrastructure.api.jira.instance
package com.atlassian.performance.tools.infrastructure.hookapi.jira.instance

import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.atlassian.performance.tools.infrastructure.api.jira.instance
package com.atlassian.performance.tools.infrastructure.hookapi.jira.instance

import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import java.util.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.atlassian.performance.tools.infrastructure.api.jira.instance
package com.atlassian.performance.tools.infrastructure.hookapi.jira.instance

import com.atlassian.performance.tools.infrastructure.api.jira.install.hook.PreInstallHooks
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PreInstallHooks
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports

interface PreInstanceHook {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.atlassian.performance.tools.infrastructure.api.jira.instance
package com.atlassian.performance.tools.infrastructure.hookapi.jira.instance

import com.atlassian.performance.tools.infrastructure.api.jira.install.hook.PreInstallHooks
import com.atlassian.performance.tools.infrastructure.hookapi.jira.install.hook.PreInstallHooks
import com.atlassian.performance.tools.infrastructure.api.jira.report.Reports
import java.util.*
import java.util.concurrent.ConcurrentLinkedQueue
Expand Down
Loading

0 comments on commit cacb5f0

Please sign in to comment.