blob: c09b1f8706866bb7e251df03ec3e87e24fc2be92 [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project>
<actions/>
<description>Create Notebook Server</description>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>Username</name>
<description>name of the scientist</description>
<defaultValue></defaultValue>
</hudson.model.StringParameterDefinition>
<hudson.model.ChoiceParameterDefinition>
<name>notebook_app</name>
<description>notebook application to be deployed</description>
<choices class="java.util.Arrays$ArrayList">
<a class="string-array">
<string>jupyter</string>
<string>rstudio</string>
<string>zeppelin</string>
<string>tensor</string>
<string>deeplearning</string>
</a>
</choices>
</hudson.model.ChoiceParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>exploratory_name</name>
<description>Name of exploratory name</description>
<defaultValue></defaultValue>
</hudson.model.StringParameterDefinition>
<hudson.model.ChoiceParameterDefinition>
<name>instance_shape</name>
<description>
Test purpose: XS: t2.medium
Memory optimized: S: r3.xlarge
Memory optimized: M: r3.4xlarge
Memory optimized: L: r3.8xlarge
GPU optimized: M: g2.2xlarge
Compute optimized: S: c4.large
Compute optimized: M: c4.2xlarge
Compute optimized: L: c4.8xlarge
</description>
<choices class="java.util.Arrays$ArrayList">
<a class="string-array">
<string>n1-standard-1</string>
<string>n1-standard-2</string>
</a>
</choices>
</hudson.model.ChoiceParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>git_creds</name>
<description>
List of git credentials in json format. For example:
[{
"username": "Test User",
"email": "test@example.com",
"hostname": "github.com",
"login": "testlogin",
"password": "testpassword"
}, ...]
Fileds "username" and "email" used for commits (display Author).
Leave "hostname" field empty to apply login/password by default for all services
</description>
<defaultValue>[{"username": "", "email": "", "hostname": "", "login": "", "password": ""}]</defaultValue>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>Spark_configurations</name>
<description></description>
<defaultValue>[]</defaultValue>
</hudson.model.StringParameterDefinition>
<hudson.model.ChoiceParameterDefinition>
<name>Action</name>
<description></description>
<choices class="java.util.Arrays$ArrayList">
<a class="string-array">
<string>create</string>
</a>
</choices>
</hudson.model.ChoiceParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.scm.NullSCM"/>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>rand=`openssl rand -hex 10`; creds=$git_creds;
sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_notebook_server/template.json | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/EXN/&apos;${exploratory_name}&apos;/g&apos; | sed &apos;s/NIT/&apos;${instance_shape}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sed &apos;s/NUN/&apos;${Username}&apos;/g&apos; | sed &quot;s/GIT/${creds}/g&quot; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/notebook:/logs/notebook docker.dlab-${notebook_app} --action $Action</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>