-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1471f46
commit fa2e627
Showing
17 changed files
with
87 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ plugins { | |
} | ||
|
||
apply plugin: 'application' | ||
apply plugin: 'com.bmuschko.docker-java-application' | ||
|
||
ext { | ||
akkaVersion = '2.6.15' | ||
|
@@ -62,6 +63,43 @@ dependencies { | |
testImplementation testFixtures(project(":mantis-control-plane:mantis-control-plane-core")) | ||
testImplementation libraries.commonsIo | ||
} | ||
def installDir = file("${buildDir}/install") | ||
def controlPlaneState = file("${project.resources}/docker") | ||
def ci = System.getenv('GITHUB_ACTIONS') | ||
def imageRepository = ci ? 'netflixoss' : 'localhost:5001/netflixoss' | ||
|
||
docker { | ||
dockerSyncBuildContext { | ||
from installDir | ||
from controlPlaneState | ||
from('docker') { | ||
into 'docker' | ||
} | ||
} | ||
|
||
dockerCreateDockerfile { | ||
instruction 'RUN apt-get update && apt-get install -y curl' | ||
|
||
// instructions to install all the necessary dependencies | ||
instruction 'WORKDIR /apps/mantis/mantis-control-plane-server' | ||
instruction 'COPY mantis-control-plane-server/bin/* bin/' | ||
instruction 'COPY mantis-control-plane-server/lib/* lib/' | ||
instruction 'COPY resources/* conf/' | ||
instruction 'COPY docker/job-clusters/* job-clusters/' | ||
instruction 'COPY docker/bin/* bin/' | ||
|
||
entryPoint './bin/start.sh' | ||
} | ||
|
||
javaApplication { | ||
baseImage = 'azul/zulu-openjdk:8-latest' | ||
maintainer = 'Mantis Developers "[email protected]"' | ||
mainClassName = 'io.mantisrx.server.master.MasterMain' | ||
images = ["$imageRepository/mantiscontrolplaneserver:latest"] | ||
ports = [8100] | ||
} | ||
} | ||
dockerSyncBuildContext.dependsOn(installDist) | ||
|
||
mainClassName = "io.mantisrx.server.master.MasterMain" | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
mantis-control-plane/mantis-control-plane-server/docker/job-clusters/SineFunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
jobNameInfo,{"name":"SineFunction","jars":[{"url":"http://mantis-examples-sine-function-2.1.0-SNAPSHOT.zip","uploadedAt":1571159980278,"version":"0.1.0-SNAPSHOT 2019-10-15 10:19:20","schedulingInfo":{"stages":{"1":{"numberOfInstances":1,"machineDefinition":{"cpuCores":1.0,"memoryMB":256.0,"networkMbps":12.0,"diskMB":10.0,"numPorts":1},"hardConstraints":[],"softConstraints":[],"scalingPolicy":null,"scalable":false}}}}],"sla":{"min":0,"max":0,"cronSpec":null,"cronPolicy":null},"parameters":[{"name":"useRandom","value":"true"}],"owner":{"name":"Mr. Mantis","teamName":"Mantis","description":"A simple job that generates x and y coordinates of a sine wave","contactEmail":"[email protected]","repo":"https://github.com/Netflix/mantis-examples/tree/master/sine-function"},"lastJobCount":0,"disabled":false,"isReadyForJobMaster":false,"migrationConfig":{"strategy":"PERCENTAGE","configString":"{\"percentToMove\":25,\"intervalMs\":60000}"},"labels":[{"name":"_mantis.user","value":"Mr. Mantis"},{"name":"_mantis.ownerEmail","value":"[email protected]"},{"name":"_mantis.artifact","value":"mantis-examples-sine-function-0.1.0-SNAPSHOT"},{"name":"_mantis.artifact.version","value":"SNAPSHOT"},{"name":"_mantis.jobType","value":""},{"name":"_mantis.criticality","value":""},{"name":"_mantis.resourceCluster","value":"DEFAULT_CLUSTER"}],"cronActive":false} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
*/ | ||
|
||
apply plugin: 'application' | ||
apply plugin: 'com.bmuschko.docker-java-application' | ||
|
||
dependencies { | ||
api project(":mantis-runtime-loader") | ||
|
@@ -37,13 +38,43 @@ dependencies { | |
testImplementation(testFixtures(project(":mantis-control-plane:mantis-control-plane-core"))) | ||
} | ||
|
||
tasks.register('copyPlaceholderFile', Copy) { | ||
from 'src/test/resources/placeholder.txt' | ||
into "${buildDir}/distributions" | ||
} | ||
def mantisExamplesSineFunction = project(":mantis-examples:mantis-examples-sine-function") | ||
def mantisExamplesSineFunctionBuildDir = mantisExamplesSineFunction.buildDir | ||
def mantisExamplesSineFunctionMantisZipArtifact = mantisExamplesSineFunction.tasks.named("mantisZipArtifact") | ||
def installDir = file("${buildDir}/install") | ||
def resourcesDir = file("${buildDir}/resources") | ||
def ci = System.getenv('GITHUB_ACTIONS') | ||
def imageRepository = ci ? 'netflixoss' : 'localhost:5001/netflixoss' | ||
|
||
docker { | ||
dockerSyncBuildContext { | ||
from mantisExamplesSineFunctionBuildDir | ||
from installDir | ||
from resourcesDir | ||
} | ||
|
||
tasks.named('installDist') { | ||
dependsOn copyPlaceholderFile | ||
dockerCreateDockerfile { | ||
instruction 'RUN apt-get update && apt-get install -y curl' | ||
// root directory to store all the files | ||
instruction 'WORKDIR /apps/mantis/mantis-server-agent' | ||
// copy the files from the build context to the image | ||
instruction 'COPY mantis-server-agent/bin/* /apps/mantis/mantis-server-agent/bin/' | ||
instruction 'COPY mantis-server-agent/lib/* /apps/mantis/mantis-server-agent/lib/' | ||
instruction 'COPY distributions/* mantis-artifacts/storage/' | ||
instruction 'COPY resources/* conf/' | ||
entryPoint 'bin/mantis-server-agent', '-p', 'conf/agent-docker.properties' | ||
} | ||
|
||
javaApplication { | ||
baseImage = 'azul/zulu-openjdk:8-latest' | ||
maintainer = 'Mantis Developers "[email protected]"' | ||
mainClassName = 'io.mantisrx.server.agent.AgentV2Main' | ||
images = ["$imageRepository/mantisagent:latest"] | ||
ports = [5050] | ||
} | ||
} | ||
|
||
dockerSyncBuildContext.dependsOn(installDist) | ||
dockerSyncBuildContext.dependsOn(mantisExamplesSineFunctionMantisZipArtifact) | ||
|
||
mainClassName = "io.mantisrx.server.agent.AgentV2Main" |
This file was deleted.
Oops, something went wrong.