├── .gitignore ├── README.md ├── custom-base-image ├── .gitignore ├── Dockerfile ├── Jenkinsfile ├── contrib │ └── wfbin │ │ └── standalone.conf ├── s2i │ └── bin │ │ ├── assemble │ │ ├── run │ │ ├── save-artifacts │ │ └── usage └── version.txt ├── docs └── images │ └── jenkins-pipeline.png ├── infrastructure ├── jenkins-agent │ ├── Dockerfile │ └── config │ │ ├── jenkins-agent.sh │ │ └── settings.xml ├── jenkins │ ├── configuration │ │ ├── config.xml.tpl │ │ ├── hudson.tasks.Maven.xml │ │ └── jobs │ │ │ ├── custom-base-image-is-trigger │ │ │ └── config.xml │ │ │ ├── custom-base-image-pipeline │ │ │ └── config.xml │ │ │ ├── ose-api-app-is-trigger │ │ │ └── config.xml │ │ │ └── ose-api-app-pipeline │ │ │ └── config.xml │ ├── plugins.txt │ └── plugins │ │ └── script-security.jpi.pinned └── nexus │ ├── Dockerfile │ ├── README.md │ ├── conf │ └── nexus.xml │ └── scripts │ ├── fix-permissions.sh │ └── startup.sh ├── init.sh ├── ose-api-app ├── .gitignore ├── Jenkinsfile ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── redhat │ │ └── summit16 │ │ ├── model │ │ └── Environment.java │ │ └── rest │ │ ├── OpenShiftEndpoint.java │ │ └── RestApplication.java │ └── webapp │ ├── assets │ ├── brand │ │ ├── bootstrap-outline.svg │ │ ├── bootstrap-punchout.svg │ │ └── bootstrap-solid.svg │ ├── css │ │ ├── docs.min.css │ │ ├── docs.min.css.map │ │ ├── ie10-viewport-bug-workaround.css │ │ └── src │ │ │ ├── docs.css │ │ │ └── pygments-manni.css │ ├── flash │ │ └── ZeroClipboard.swf │ ├── img │ │ ├── components.png │ │ ├── devices.png │ │ ├── expo-lyft.jpg │ │ ├── expo-newsweek.jpg │ │ ├── expo-riot.jpg │ │ ├── expo-vogue.jpg │ │ └── sass-less.png │ └── js │ │ ├── customize.min.js │ │ ├── docs.min.js │ │ ├── ie-emulation-modes-warning.js │ │ ├── ie10-viewport-bug-workaround.js │ │ ├── ie8-responsive-file-warning.js │ │ ├── raw-files.min.js │ │ ├── src │ │ ├── application.js │ │ └── customizer.js │ │ └── vendor │ │ ├── Blob.js │ │ ├── FileSaver.js │ │ ├── ZeroClipboard.min.js │ │ ├── anchor.js │ │ ├── autoprefixer.js │ │ ├── holder.min.js │ │ ├── jquery.min.js │ │ ├── jszip.min.js │ │ ├── less.min.js │ │ └── uglify.min.js │ ├── dist │ ├── css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ └── npm.js │ ├── index.html │ ├── ose-cicd.js │ └── starter-template.css └── support └── templates ├── app-template.json ├── create-sa.json ├── custom-base-image-template.json ├── gogs-ephemeral-template.json ├── gogs-persistent-template.json ├── jenkins-agent-template.json ├── jenkins-template.json ├── nexus-ephemeral-template.json ├── nexus-persistent-template.json ├── postgresql-ephemeral.json ├── postgresql-persistent.json ├── rhel7-is.json └── shared-resource-template.json /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | *.m4v 3 | .DS_Store 4 | RemoteSystemsTempFiles/ 5 | .index/ 6 | *.zip 7 | repository/ 8 | *.tar 9 | .classpath 10 | .project 11 | .settings 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Red Hat Summit 2016 Enterprise CI/CD with OpenShift 2 | ============================== 3 | 4 | This repository contains the material for building an Enterprise Continuous Integration and Continuous Delivery environment within [OpenShift](https://www.openshift.com/) and demonstrates common enterprise patterns for building and deploying containerized applications. 5 | 6 | 7 | ## Components 8 | 9 | The following components are built into the OpenShift environment as containers 10 | 11 | * [Jenkins](https://jenkins.io/) 12 | * [Nexus](http://www.sonatype.org/nexus/) 13 | * [Gogs](https://gogs.io/) 14 | * [PostgreSQL](https://www.postgresql.org/) 15 | 16 | ## Prerequisites 17 | 18 | This demo requires an OpenShift environment be available as a target runtime. In addition, access to the [OpenShift Command Line tool](https://access.redhat.com/downloads/content/290). 19 | 20 | ## Demo Motivations 21 | 22 | In many enterprise organizations that are working with Linux containers, application teams are not working with the direct upstream images that are provided from trusted sources. such as the Red Hat registry, and instead teams within the organization are providing a customized approved image beforehand. This allows for the application of necessary security and organizational requirements prior to developer usage. Being able to detect and react upon when upstream image changes occur is critical t the Continuous Integration and Continuous Delivery of both base and application images and ensures application teams are running with the most recent images. 23 | 24 | The goal is to demonstrate how tools commonly used within enterprises can be used to emphasize the concepts of Continuous Integration and Continuous delivery using OpenShift as a runtime platform for both infrastructure applications as well as applications created by development teams. 25 | 26 | In this example, an operations team creates a custom base docker image that enables the use of Wildfly Swarm applications for developers. These set of actions are modeled into an operations pipeline. An application team leveraging Wildfly Swarm applications utilizes the base image for the creation of their own containerized applications leveraging the Swarm framework. They have a typical application pipeline that is separated into multiple stages of functionality including the building of Java artifacts and promotion between logically separated environments within OpenShift. 27 | 28 | ## Building the Environment 29 | 30 | The entire environment can be stood up by running the included `init.sh` script. By default, the script assumes the Red Hat Container Development Kit (CDK) will be the target environment with the default OpenShift master URL at `https://10.1.2.2:8443` and using the Administrative account. These values are specified at the top of the script in the following variables: 31 | 32 | * OSE_CLI_HOST 33 | * OSE_CLI_USER 34 | * OSE_CLI_PASSWORD 35 | 36 | Modify these variables to match the running target environment and once satisfied, execute the command `./init.sh` from within the repository 37 | 38 | Once the setup is complete, you can navigate to the OpenShift web console to view the infrastructure components located in the *ci* project. Applications will not be available in the api-app-<environment> projects until a successful pipeline was completed end to end. 39 | 40 | ## Default Credentials 41 | 42 | The following credentials are configured by default as part of the installation and configuration process 43 | 44 | * Jenkins: admin/password 45 | * Nexus: admin/admin123 46 | * gogs: gogs/osegogs 47 | 48 | 49 | ## Environment Overview 50 | 51 | After the environment has been built successfully build and running, the following OpenShift projects are available 52 | 53 | * ci 54 | * Contains the set of Continuous Integration and Continuous Delivery components including Jenkins, Nexus, and Gogs 55 | * custom-base-image 56 | * Builds a custom base Source to Image builder (S2I) image for running Wildfly Swarm applications 57 | * api-app-dev 58 | * Development environment for the API application 59 | * api-app-uat 60 | * User Acceptance Testing environment for the API application 61 | api-app-prod 62 | * Production environment for the API application 63 | 64 | ### Jenkins Jobs 65 | 66 | Jenkins is used as the orchestration tool to facilitate the build and deployment pipeline. 67 | 68 | ![Pipeline Overview](docs/images/jenkins-pipeline.png) 69 | 70 | 71 | Included in Jenkins are the following jobs: 72 | 73 | * custom-base-image-pipeline - Performs a build of a new Source to Image builder image and tags the newly created image for consumption by application teams 74 | * custom-base-image-is-trigger - Triggers the custom-base-image-pipeline whenever a change occurs to the base OpenShift Source to Image builder 75 | * ose-api-app-pipeline - Pipeline for building an application that queries the OpenShift API. the pipeline consists of building a Maven based Java application to be deployed as part of a Wildfly Swarm application. The pipeline is composed of automated build and deployments to a development and user acceptance testing environment as well as automated testing. A manual promotion process is performed by users to promote the application into a production environment. 76 | * ose-api-app-trigger - Triggers the ose-api-app-pipeline whenever a change occurs to the custom base image. 77 | 78 | 79 | ## Running through the demo 80 | 81 | To simulate the goal of the demonstration, we will make a change to the base image that will cause a rebuild of the base image and automatically trigger application teams pipelines. 82 | 83 | 1. The first step is to clone the `custom-base-image` git repository from the included gogs server. Navigate to the OpenShift web console and select the **ci** project. Once inside the ci project, select the URL for the gogs route. 84 | 2. Inside gogs, select the **explore** button at the top of the screen to list the available repositories and select the **custom-base-image** repository. 85 | 3. Locate the *http* based url for the repository that will be used to clone the repository 86 | 4. From your local machine, clone the *custom-base-image* repository 87 | 88 | ``` 89 | git clone 90 | ``` 91 | 5. Change into the cloned folder and locate the `Dockerfile` that is used to build the docker image. We will make a small addition that will add a new file to the base image. Add the following line just prior to the `USER` statement and save the changes once complete 92 | 93 | ``` 94 | echo "Custom modification" > /opt/openshift/custom.txt 95 | ``` 96 | 6. Commit the change and push the changes back to the git repository. Use the credentials found in the *Default Credentials* section above when promoted to push the changes 97 | 98 | ``` 99 | git add Dockerfile 100 | git commit -m "Modification to the Dockerfile" 101 | git push origin master 102 | ``` 103 | 7. This will trigger a new build of the *custom-base-image-pipeline*. Once complete, the tag is updated to refer to the newly created image 104 | 8. Once the tag has been updated, Jenkins monitors ImageStream for the `custom-base-image` and once a change is detected, the *ose-api-app-trigger* job is triggered which in turn will trigger the *ose-api-app-pipeline* job 105 | 9. Application pipeline will build the java artifact using maven, package and deploy the artifact to the nexus server. A new Source to Image build in OpenShift will be triggered using the artifacts from the maven build. Once the build completes, the newly created image will be deployed to the development environment (api-app-dev) 106 | 10. An automated promotion to the user acceptance testing environment will then occur (api-app-uat) followed by acceptance testing to validate successful functionality of the application. 107 | 11. Before a promotion to the production environment occurs, a manual promotion process must be initiated. Navigate to the running *ose-api-app-pipeline* job and select the **Paused for Input** link on the lefthand side of the page. Select the **Proceed** button to promote the application to the production environment. -------------------------------------------------------------------------------- /custom-base-image/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | *.m4v 3 | .DS_Store 4 | RemoteSystemsTempFiles/ 5 | .index/ 6 | *.zip 7 | repository/ 8 | *.tar 9 | .classpath 10 | .project 11 | .settings 12 | -------------------------------------------------------------------------------- /custom-base-image/Dockerfile: -------------------------------------------------------------------------------- 1 | # This image provides a base for building and running WildFly Swarm 2 | # applications. It builds using maven and runs the resulting swarm 3 | # artifact. 4 | 5 | FROM openshift/base-centos7 6 | 7 | MAINTAINER Andrew Block 8 | 9 | EXPOSE 8080 8888 10 | 11 | ENV MAVEN_VERSION 3.3.9 12 | 13 | LABEL io.k8s.description="Platform for building and running JEE applications on WildFly Swarm" \ 14 | io.k8s.display-name="WildFly Swarm" \ 15 | io.openshift.expose-services="8080:http,8888:ping" \ 16 | io.openshift.tags="builder,wildflyswarm" \ 17 | io.openshift.s2i.destination="/opt/s2i/destination" 18 | 19 | # Install Maven 20 | RUN yum install -y --enablerepo=centosplus \ 21 | tar unzip bc which lsof java-1.8.0-openjdk java-1.8.0-openjdk-devel && \ 22 | yum clean all -y && \ 23 | (curl -0 http://www.us.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | \ 24 | tar -zx -C /usr/local) && \ 25 | ln -sf /usr/local/apache-maven-$MAVEN_VERSION/bin/mvn /usr/local/bin/mvn && \ 26 | mkdir -p /opt/openshift && chmod -R a+rwX /opt/openshift && \ 27 | mkdir -p /opt/app-root/source && chmod -R a+rwX /opt/app-root/source && \ 28 | mkdir -p /opt/s2i/destination && chmod -R a+rwX /opt/s2i/destination && \ 29 | mkdir -p /opt/app-root/src && chmod -R a+rwX /opt/app-root/src 30 | 31 | 32 | # Copy the S2I scripts from the specific language image to /usr/local/sti 33 | COPY ./s2i/bin/ $STI_SCRIPTS_PATH 34 | 35 | 36 | USER 1001 37 | 38 | CMD $STI_SCRIPTS_PATH/usage 39 | -------------------------------------------------------------------------------- /custom-base-image/Jenkinsfile: -------------------------------------------------------------------------------- 1 | node('ose-agent') { 2 | 3 | env.KUBECONFIG = pwd() + "/.kubeconfig" 4 | def baseImageProject = "custom-base-image" 5 | def enterpriseResourcesProject = "enterprise-resources" 6 | def baseImage = "custom-base-image" 7 | def WORKSPACE = pwd() 8 | 9 | stage 'Checkout' 10 | 11 | checkout scm 12 | 13 | stage 'Update BuildConfig Version' 14 | 15 | def finalTagVersion = parseVersion("${WORKSPACE}/version.txt") 16 | 17 | def buildVersion = "${finalTagVersion}-\${BUILD_NUMBER}" 18 | 19 | login() 20 | 21 | sh """ 22 | set +x 23 | 24 | currentOutputName=\$(oc get bc ${baseImage} -n ${baseImageProject} --template='{{ .spec.output.to.name }}') 25 | 26 | newImageName=\${currentOutputName%:*}:${buildVersion} 27 | 28 | oc patch bc ${baseImage} -n ${baseImageProject} -p "{ \\"spec\\": { \\"output\\": { \\"to\\": { \\"name\\": \\"\${newImageName}\\" } } } }" 29 | 30 | """ 31 | stage "Build Image" 32 | 33 | 34 | login() 35 | 36 | sh """ 37 | set +x 38 | oc start-build ${baseImage} -n ${baseImageProject} --follow=true --wait=true --from-dir="${WORKSPACE}/" 39 | """ 40 | 41 | stage "Tag Image" 42 | login() 43 | 44 | sh """ 45 | set +x 46 | oc tag ${baseImageProject}/${baseImage}:${buildVersion} ${baseImageProject}/${baseImage}:${finalTagVersion} 47 | 48 | oc tag ${baseImageProject}/${baseImage}:${finalTagVersion} ${enterpriseResourcesProject}/${baseImage}:${finalTagVersion} 49 | """ 50 | } 51 | 52 | def login() { 53 | sh """ 54 | set +x 55 | oc login --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt --token=\$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) https://kubernetes.default.svc.cluster.local >/dev/null 2>&1 || echo 'OpenShift login failed' 56 | """ 57 | } 58 | 59 | def parseVersion(String filename) { 60 | def version = readFile(filename) 61 | version.trim() 62 | } -------------------------------------------------------------------------------- /custom-base-image/contrib/wfbin/standalone.conf: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function print_sed_exp_replace_env_var { 4 | sed_exp="" 5 | for openshift_var in $(env | grep OPENSHIFT_ | awk -F '=' '{print $1}') 6 | do 7 | # environment variable values that contain " or / need to be escaped 8 | # or they will cause problems in the sed command line. 9 | variable_val=$(echo "${!openshift_var}" | sed -e "s@\/@\\\\/@g" | sed -e "s/\"/\\\\\"/g") 10 | # the entire sed s/search/replace/g command needs to be quoted in case the variable value 11 | # contains a space. 12 | sed_exp="${sed_exp} -e \"s/\\\${env.${openshift_var}}/${variable_val}/g\"" 13 | done 14 | printf "%s\n" "$sed_exp" 15 | } 16 | 17 | CART_DIR=/wildfly 18 | 19 | if [ -n "$DEFAULT_DATASOURCE" ] 20 | then 21 | export OPENSHIFT_DEFAULT_DATASOURCE=$DEFAULT_DATASOURCE 22 | fi 23 | 24 | # mysql db container must be linked w/ alias "mysql" 25 | export MYSQL_ENABLED="false" 26 | if [ -n "$MYSQL_DATABASE" ] 27 | then 28 | export OPENSHIFT_MYSQL_DB_PORT=$MYSQL_SERVICE_PORT 29 | export OPENSHIFT_MYSQL_DB_HOST=$MYSQL_SERVICE_HOST 30 | export OPENSHIFT_MYSQL_DB_PASSWORD=$MYSQL_PASSWORD 31 | export OPENSHIFT_MYSQL_DB_USERNAME=$MYSQL_USER 32 | export OPENSHIFT_MYSQL_DB_URL=mysql://${OPENSHIFT_MYSQL_DB_USERNAME}:${OPENSHIFT_MYSQL_DB_PASSWORD}@${OPENSHIFT_MYSQL_DB_HOST}:${OPENSHIFT_MYSQL_DB_PORT}/ 33 | export OPENSHIFT_MYSQL_DB_NAME=$MYSQL_DATABASE 34 | if [ -n "$MYSQL_DATASOURCE" ] 35 | then 36 | export OPENSHIFT_MYSQL_DATASOURCE=$MYSQL_DATASOURCE 37 | else 38 | export OPENSHIFT_MYSQL_DATASOURCE="MySQLDS" 39 | fi 40 | if [ ! -n "${OPENSHIFT_DEFAULT_DATASOURCE}" ] 41 | then 42 | export OPENSHIFT_DEFAULT_DATASOURCE=${OPENSHIFT_MYSQL_DATASOURCE} 43 | fi 44 | export MYSQL_ENABLED="true" 45 | fi 46 | 47 | # postgresql db container must be linked w/ alias "postgresql" 48 | export POSTGRESQL_ENABLED="false" 49 | if [ -n "$POSTGRESQL_DATABASE" ] 50 | then 51 | export OPENSHIFT_POSTGRESQL_DB_PORT=$POSTGRESQL_SERVICE_PORT 52 | export OPENSHIFT_POSTGRESQL_DB_HOST=$POSTGRESQL_SERVICE_HOST 53 | export OPENSHIFT_POSTGRESQL_DB_PASSWORD=$POSTGRESQL_PASSWORD 54 | export OPENSHIFT_POSTGRESQL_DB_USERNAME=$POSTGRESQL_USER 55 | export OPENSHIFT_POSTGRESQL_DB_URL=mysql://${OPENSHIFT_POSTGRESQL_DB_USERNAME}:${OPENSHIFT_POSTGRESQL_DB_PASSWORD}@${OPENSHIFT_POSTGRESQL_DB_HOST}:${OPENSHIFT_POSTGRESQL_DB_PORT}/ 56 | export OPENSHIFT_POSTGRESQL_DB_NAME=$POSTGRESQL_DATABASE 57 | if [ -n "$POSTGRESQL_DATASOURCE" ] 58 | then 59 | export OPENSHIFT_POSTGRESQL_DATASOURCE=$POSTGRESQL_DATASOURCE 60 | else 61 | export OPENSHIFT_POSTGRESQL_DATASOURCE="PostgreSQLDS" 62 | fi 63 | if [ ! -n "${OPENSHIFT_DEFAULT_DATASOURCE}" ] 64 | then 65 | export OPENSHIFT_DEFAULT_DATASOURCE=${OPENSHIFT_POSTGRESQL_DATASOURCE} 66 | fi 67 | export POSTGRESQL_ENABLED="true" 68 | fi 69 | 70 | if [ ! -n "${OPENSHIFT_DEFAULT_DATASOURCE}" ] 71 | then 72 | export OPENSHIFT_DEFAULT_DATASOURCE="ExampleDS" 73 | fi 74 | 75 | export OPENSHIFT_HOSTNAME=$HOSTNAME 76 | 77 | max_threads=$(ulimit -u) 78 | 79 | if ! [[ "$max_threads" =~ ^[0-9]+$ ]] ; then 80 | max_threads=1024 81 | fi 82 | 83 | if [ -z "$JVM_HEAP_RATIO" ]; then 84 | JVM_HEAP_RATIO=0.5 85 | fi 86 | if [ -z "$JVM_PERMGEN_RATIO" ]; then 87 | JVM_PERMGEN_RATIO=0.2 88 | fi 89 | if [ -z "$MESSAGING_THREAD_RATIO" ]; then 90 | MESSAGING_THREAD_RATIO=0.2 91 | fi 92 | 93 | max_memory_mb=${OPENSHIFT_GEAR_MEMORY_MB} 94 | if [ -z "$OPENSHIFT_GEAR_MEMORY_MB" ]; then 95 | max_memory_mb=512 96 | fi 97 | max_heap=$( echo "$max_memory_mb * $JVM_HEAP_RATIO" | bc | awk '{print int($1+0.5)}') 98 | max_permgen=$( echo "$max_memory_mb * $JVM_PERMGEN_RATIO" | bc | awk '{print int($1+0.5)}') 99 | 100 | messaging_thread_pool_max_size=$( echo "$max_threads * $MESSAGING_THREAD_RATIO" | bc | awk '{print int($1+0.5)}') 101 | messaging_scheduled_thread_pool_max_size=5 102 | # $( echo "$max_threads * $MESSAGING_THREAD_RATIO" | bc | awk '{print int($1+0.5)}') 103 | 104 | if [ $max_permgen -gt 256 ] 105 | then 106 | max_permgen=256 107 | fi 108 | 109 | if [ $max_heap -lt 1024 ] 110 | then 111 | memory_options="-XX:+UseSerialGC -Xms40m -Xmx${max_heap}m -XX:MaxPermSize=${max_permgen}m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true" 112 | else 113 | memory_options="-XX:+UseSerialGC -Xms40m -Xmx${max_heap}m -XX:MaxPermSize=${max_permgen}m -XX:+AggressiveOpts" 114 | fi 115 | 116 | if [ -z "${OPENSHIFT_WILDFLY_CLUSTER_PROXY_PORT}" ]; then 117 | export OPENSHIFT_WILDFLY_CLUSTER_PROXY_PORT=7600 118 | fi 119 | 120 | if [ -z "${OPENSHIFT_WILDFLY_CLUSTER}" ]; then 121 | export OPENSHIFT_WILDFLY_CLUSTER="${OPENSHIFT_JBOSSEAP_IP}[${OPENSHIFT_JBOSSEAP_CLUSTER_PORT}]" 122 | fi 123 | 124 | sed_replace_env=$(print_sed_exp_replace_env_var) 125 | 126 | # Timestamp based filename for uniquenss. 127 | # %s%N would be more unique but is not portable outside of linux 128 | systime=`date +%s` 129 | 130 | # Due to how bash handles quotes within variables, we need to write the entire 131 | # sed command out to a file and then run it, rather than running the sed 132 | # command directly from within the script, passing the variables as arguments 133 | # See http://mywiki.wooledge.org/BashFAQ/050 134 | cat < /tmp/sed_${systime}.sh 135 | sed -i -e "s/\\\${mysql.enabled}/$MYSQL_ENABLED/g" \ 136 | -e "s/\\\${postgresql.enabled}/$POSTGRESQL_ENABLED/g" \ 137 | -e "s/\\\${messaging.thread.pool.max.size}/$messaging_thread_pool_max_size/g" \ 138 | -e "s/\\\${messaging.scheduled.thread.pool.max.size}/$messaging_scheduled_thread_pool_max_size/g" \ 139 | ${sed_replace_env} \ 140 | /wildfly/standalone/configuration/standalone.xml > /dev/null 2>&1 141 | EOF 142 | . /tmp/sed_${systime}.sh 143 | rm /tmp/sed_${systime}.sh 144 | 145 | # 146 | # Specify options to pass to the Java VM. 147 | # 148 | 149 | if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then 150 | JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman" 151 | fi 152 | 153 | if [ -z "$JAVA_OPTS" ]; then 154 | JAVA_OPTS="$memory_options -DOPENSHIFT_APP_UUID=${OPENSHIFT_APP_UUID} -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -Djboss.node.name=${OPENSHIFT_HOSTNAME} -Djgroups.bind_addr=0.0.0.0 -Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on" 155 | if [ ! -z "$ENABLE_JPDA" ]; then 156 | JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=0.0.0.0:8787,server=y,suspend=n ${JAVA_OPTS}" 157 | fi 158 | fi 159 | 160 | if [ -n "$JAVA_OPTS_EXT" ]; then 161 | JAVA_OPTS="$JAVA_OPTS $JAVA_OPTS_EXT" 162 | fi 163 | 164 | export JBOSS_MODULEPATH=/wildfly/provided_modules 165 | 166 | if [ ! -z $OPENSHIFT_WILDFLY_MODULE_PATH ]; then 167 | export JBOSS_MODULEPATH=$JBOSS_MODULEPATH:$OPENSHIFT_WILDFLY_MODULE_PATH 168 | fi 169 | 170 | export JBOSS_MODULEPATH=$JBOSS_MODULEPATH:/wildfly/modules 171 | export JAVA_OPTS 172 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /custom-base-image/s2i/bin/assemble: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Source code provided to S2I is at ${HOME} 4 | LOCAL_SOURCE_DIR=${HOME} 5 | mkdir -p $LOCAL_SOURCE_DIR 6 | DEPLOY_DIR=/opt/openshift 7 | 8 | # the subdirectory within LOCAL_SOURCE_DIR from where we should copy build 9 | # artifacts (*.war, *.jar) 10 | ARTIFACT_DIR=${ARTIFACT_DIR:-target} 11 | 12 | # Copy the source for compilation 13 | cp -Rf /opt/s2i/destination/src/. $LOCAL_SOURCE_DIR 14 | chgrp -R 0 $LOCAL_SOURCE_DIR 15 | chmod -R g+rw $LOCAL_SOURCE_DIR 16 | 17 | function copy_artifacts() { 18 | if [ -d $LOCAL_SOURCE_DIR/$1 ]; then 19 | echo "Copying all JAR artifacts from $LOCAL_SOURCE_DIR/$1 directory into $DEPLOY_DIR for later deployment..." 20 | cp -v $LOCAL_SOURCE_DIR/$1/*.jar $DEPLOY_DIR 2> /dev/null 21 | fi 22 | } 23 | 24 | 25 | # If a pom.xml is present, this is a normal build scenario 26 | # so run maven. 27 | if [ -f "$LOCAL_SOURCE_DIR/pom.xml" ]; then 28 | pushd $LOCAL_SOURCE_DIR &> /dev/null 29 | 30 | if [ -z "$MAVEN_ARGS" ]; then 31 | export MAVEN_ARGS="-U clean install -Popenshift -DskipTests" 32 | fi 33 | if [ -z "$MAVEN_ARGS_APPEND" ]; then 34 | export MAVEN_ARGS="$MAVEN_ARGS $MAVEN_ARGS_APPEND" 35 | fi 36 | echo "Found pom.xml... attempting to build with 'mvn ${MAVEN_ARGS}'" 37 | 38 | mvn --version 39 | mvn $MAVEN_ARGS 40 | 41 | ERR=$? 42 | if [ $ERR -ne 0 ]; then 43 | echo "Aborting due to error code $ERR from mvn package" 44 | exit $ERR 45 | fi 46 | 47 | copy_artifacts "$ARTIFACT_DIR" jar 48 | 49 | popd &> /dev/null 50 | 51 | # Blow away our maven repository so we don't bloat the resulting 52 | # image with all our build dependencies 53 | rm -rf ~/.m2/repository 54 | 55 | elif [ -d $LOCAL_SOURCE_DIR/deployments ]; then 56 | copy_artifacts "deployments" 57 | else 58 | echo "Unable to determine source" 59 | exit 1 60 | fi 61 | 62 | echo "...done" 63 | -------------------------------------------------------------------------------- /custom-base-image/s2i/bin/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LOCAL_SOURCE_DIR=${HOME} 4 | DEPLOY_DIR=/opt/openshift 5 | 6 | if [ -z "$SWARM_JAR" ]; then 7 | SWARM_JAR="$DEPLOY_DIR/*-swarm.jar" 8 | fi 9 | 10 | BIND_IP=`hostname -i` 11 | 12 | export OPENSHIFT_KUBE_PING_NAMESPACE=$OPENSHIFT_BUILD_NAMESPACE 13 | 14 | exec java -Dswarm.bind.address=$BIND_IP -Dswarm.http.port=8080 \ 15 | -Dswarm.port.offset=0 -Djava.net.preferIPv4Stack=true \ 16 | $SWARM_JVM_ARGS -jar $SWARM_JAR $SWARM_JAR_ARGS 17 | -------------------------------------------------------------------------------- /custom-base-image/s2i/bin/save-artifacts: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | pushd ${HOME} >/dev/null 4 | 5 | # ${HOME}/.m2 is the maven repo dir 6 | # {$HOME}/source/target is the class files from the previous build 7 | if [ -d ./source/target ]; then 8 | tar cf - ./.m2 ./source/target 9 | else 10 | tar cf - ./.m2 11 | fi 12 | 13 | popd >/dev/null 14 | 15 | -------------------------------------------------------------------------------- /custom-base-image/s2i/bin/usage: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat < 4 | 5 | ENV HOME /opt/jenkins-agent 6 | ENV JNLP_AGENT_VERSION 2.60 7 | ENV MAVEN_VERSION 3.3.9 8 | ENV JAVA_HOME /usr/lib/jvm/java 9 | 10 | RUN yum clean all && \ 11 | export INSTALL_PKGS="nss_wrapper java-1.8.0-openjdk-devel java-1.8.0-openjdk-headless gettext tar git which origin-clients unzip" && \ 12 | yum -y --setopt=tsflags=nodocs install epel-release centos-release-openshift-origin && \ 13 | yum install -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \ 14 | rpm -V $INSTALL_PKGS && \ 15 | yum clean all && \ 16 | mkdir -p /opt/jenkins-agent/bin /var/lib/jenkins && \ 17 | chown -R 1001:0 /var/lib/jenkins && \ 18 | curl -fsSL http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share \ 19 | && mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \ 20 | && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn 21 | 22 | # Copy script 23 | COPY config/jenkins-agent.sh config/settings.xml /opt/jenkins-agent/ 24 | 25 | # Download JNLP Client, move configurations/scripts and modify permissions 26 | RUN mv /opt/jenkins-agent/jenkins-agent.sh /opt/jenkins-agent/bin && \ 27 | mv /opt/jenkins-agent/settings.xml /usr/share/maven/conf/settings.xml && \ 28 | chown -R 1001:0 /opt/jenkins-agent /opt/jenkins-agent/bin && \ 29 | chmod -R g+w /opt/jenkins-agent 30 | 31 | WORKDIR /var/lib/jenkins 32 | 33 | VOLUME /var/lib/jenkins 34 | 35 | USER 1001 36 | 37 | ENTRYPOINT ["/opt/jenkins-agent/bin/jenkins-agent.sh"] -------------------------------------------------------------------------------- /infrastructure/jenkins-agent/config/jenkins-agent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Set current user in nss_wrapper 4 | USER_ID=$(id -u) 5 | GROUP_ID=$(id -g) 6 | 7 | NSS_WRAPPER_PASSWD=/tmp/nss_passwd 8 | NSS_WRAPPER_GROUP=/etc/group 9 | 10 | cat /etc/passwd | sed -e 's/^default:/builder:/' > $NSS_WRAPPER_PASSWD 11 | 12 | echo "default:x:${USER_ID}:${GROUP_ID}:Default Application User:${HOME}:/sbin/nologin" >> $NSS_WRAPPER_PASSWD 13 | 14 | export NSS_WRAPPER_PASSWD 15 | export NSS_WRAPPER_GROUP 16 | export LD_PRELOAD=libnss_wrapper.so 17 | 18 | JAR="/opt/jenkins-agent/bin/agent.jar" 19 | 20 | 21 | # if -url is not provided try env vars 22 | if [[ "$@" != *"-url "* ]]; then 23 | if [ ! -z "$JENKINS_URL" ]; then 24 | PARAMS="$PARAMS -url $JENKINS_URL" 25 | elif [ ! -z "$JENKINS_SERVICE_HOST" ] && [ ! -z "$JENKINS_SERVICE_PORT" ]; then 26 | PARAMS="$PARAMS -url http://$JENKINS_SERVICE_HOST:$JENKINS_SERVICE_PORT" 27 | fi 28 | fi 29 | 30 | echo "Downloading ${JENKINS_URL}/jnlpJars/remoting.jar ..." 31 | curl ${JENKINS_URL}/jnlpJars/remoting.jar -o ${JAR} 32 | 33 | # if -tunnel is not provided try env vars 34 | if [[ "$@" != *"-tunnel "* ]]; then 35 | if [ ! -z "$JENKINS_TUNNEL" ]; then 36 | PARAMS="$PARAMS -tunnel $JENKINS_TUNNEL" 37 | elif [ ! -z "$JENKINS_AGENT_SERVICE_HOST" ] && [ ! -z "$JENKINS_AGENT_SERVICE_PORT" ]; then 38 | PARAMS="$PARAMS -tunnel $JENKINS_AGENT_SERVICE_HOST:$JENKINS_AGENT_SERVICE_PORT" 39 | fi 40 | fi 41 | 42 | exec java $JAVA_OPTS \ 43 | -cp $JAR hudson.remoting.jnlp.Main -headless $PARAMS -jar-cache $HOME "$@" 44 | 45 | exec "$@" 46 | -------------------------------------------------------------------------------- /infrastructure/jenkins-agent/config/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 46 | 49 | 55 | /opt/jenkins-agent 56 | 57 | 65 | 66 | 73 | 74 | 79 | 80 | 84 | 85 | 86 | 91 | 92 | 106 | 107 | 108 | 112 | 113 | 126 | 127 | 134 | 135 | nexus 136 | admin 137 | admin123 138 | 139 | 140 | 141 | 152 | 153 | 165 | 166 | nexus 167 | * 168 | http://${env.NEXUS_SERVICE_HOST}:${env.NEXUS_SERVICE_PORT}/content/groups/public/ 169 | 170 | 171 | 172 | 193 | 194 | 195 | nexus 196 | 197 | 198 | nexus::default::http://${env.NEXUS_SERVICE_HOST}:${env.NEXUS_SERVICE_PORT}/content/repositories/snapshots/ 199 | nexus::default::http://${env.NEXUS_SERVICE_HOST}:${env.NEXUS_SERVICE_PORT}/content/repositories/releases/ 200 | nexus::default::http://${env.NEXUS_SERVICE_HOST}:${env.NEXUS_SERVICE_PORT}/content/repositories/snapshots/ 201 | 202 | 203 | 204 | 205 | 209 | 210 | nexus 211 | 212 | 213 | -------------------------------------------------------------------------------- /infrastructure/jenkins/configuration/config.xml.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.651.2 5 | 5 6 | NORMAL 7 | true 8 | 9 | hudson.model.Computer.Configure:admin 10 | hudson.model.Computer.Configure:system_builder 11 | hudson.model.Computer.Delete:admin 12 | hudson.model.Hudson.Administer:admin 13 | hudson.model.Hudson.Administer:system_builder 14 | hudson.model.Hudson.Read:admin 15 | hudson.model.Hudson.Read:system_builder 16 | hudson.model.Item.Build:admin 17 | hudson.model.Item.Configure:admin 18 | hudson.model.Item.Create:admin 19 | hudson.model.Item.Delete:admin 20 | hudson.model.Item.Read:admin 21 | hudson.model.Item.Workspace:admin 22 | hudson.model.Run.Delete:admin 23 | hudson.model.Run.Update:admin 24 | hudson.model.View.Configure:admin 25 | hudson.model.View.Create:admin 26 | hudson.model.View.Delete:admin 27 | hudson.scm.SCM.Tag:admin 28 | 29 | 30 | true 31 | false 32 | 33 | false 34 | ${ITEM_ROOTDIR}/workspace 35 | ${ITEM_ROOTDIR}/builds 36 | 37 | 38 | 39 | 40 | 41 | ${KUBERNETES_CONFIG} 42 | 43 | 1 44 | 0 45 | 46 | 47 | 48 | All 49 | false 50 | false 51 | 52 | 53 | 54 | All 55 | 50000 56 | 57 | 58 | 59 | true 60 | -------------------------------------------------------------------------------- /infrastructure/jenkins/configuration/hudson.tasks.Maven.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | maven 6 | /usr/share/maven/ 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /infrastructure/jenkins/configuration/jobs/custom-base-image-is-trigger/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | false 7 | 8 | 9 | base-centos 10 | latest 11 | https://kubernetes.default.svc.cluster.local 12 | custom-base-image 13 | 14 | false 15 | 16 | true 17 | false 18 | false 19 | false 20 | 21 | 22 | H * * * * 23 | false 24 | 25 | 26 | false 27 | 28 | 29 | 30 | 31 | 32 | 33 | custom-base-image-pipeline 34 | SUCCESS 35 | false 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /infrastructure/jenkins/configuration/jobs/custom-base-image-pipeline/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | false 6 | 7 | 8 | 9 | 2 10 | 11 | 12 | http://gogs:3000/gogs/custom-base-image.git 13 | 14 | 15 | 16 | 17 | */master 18 | 19 | 20 | false 21 | 22 | 23 | 24 | Jenkinsfile 25 | 26 | 27 | -------------------------------------------------------------------------------- /infrastructure/jenkins/configuration/jobs/ose-api-app-is-trigger/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | false 6 | 7 | custom-base-image 8 | 1.0 9 | https://kubernetes.default.svc.cluster.local 10 | enterprise-resources 11 | 12 | false 13 | 14 | true 15 | false 16 | false 17 | false 18 | 19 | 20 | * * * * * 21 | false 22 | 23 | 24 | false 25 | 26 | 27 | 28 | 29 | 30 | 31 | ose-api-app-pipeline 32 | SUCCESS 33 | false 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /infrastructure/jenkins/configuration/jobs/ose-api-app-pipeline/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | false 6 | 7 | 8 | 9 | 2 10 | 11 | 12 | http://gogs:3000/gogs/ose-api-app.git 13 | 14 | 15 | 16 | 17 | */master 18 | 19 | 20 | false 21 | 22 | 23 | 24 | Jenkinsfile 25 | 26 | 27 | -------------------------------------------------------------------------------- /infrastructure/jenkins/plugins.txt: -------------------------------------------------------------------------------- 1 | # Pipeline plugin - https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin 2 | workflow-aggregator:2.0 3 | workflow-api:2.0 4 | workflow-durable-task-step:2.0 5 | workflow-cps-global-lib:2.0 6 | workflow-job:2.0 7 | pipeline-build-step:2.0 8 | workflow-multibranch:2.0 9 | workflow-cps:2.0 10 | workflow-scm-step:2.0 11 | pipeline-stage-step:2.0 12 | workflow-basic-steps:2.0 13 | pipeline-input-step:2.0 14 | workflow-support:2.0 15 | workflow-step-api:2.0 16 | 17 | # Pipeline Multibranch Plugin - https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Multibranch+Plugin 18 | workflow-multibranch:2.0 19 | # commented out as superseded by other plugins 20 | #workflow-job:1.15 21 | cloudbees-folder:5.2.1 22 | 23 | # Pipeine stage view plugin - https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Stage+View+Plugin 24 | pipeline-stage-view:1.4 25 | jquery-detached:1.2.1 26 | handlebars:1.1.1 27 | pipeline-rest-api:1.4 28 | momentjs:1.1.1 29 | 30 | 31 | # remote loader https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Remote+Loader+Plugin 32 | workflow-remote-loader:1.2 33 | scm-api:1.2 34 | branch-api:1.8 35 | # commented out as superseded by other plugins 36 | #workflow-cps:1.15 37 | 38 | 39 | # kubernetes plugin - https://wiki.jenkins-ci.org/display/JENKINS/Kubernetes+Plugin 40 | kubernetes:0.6 41 | durable-task:1.10 42 | credentials:2.0.7 43 | 44 | # Pipeline SCM Step Plugin - https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+SCM+Step+Plugin 45 | workflow-scm-step:2.0 46 | git:2.4.4 47 | subversion:2.5.7 48 | # commented out as superseded by other plugins 49 | #workflow-step-api:1.15 50 | 51 | # mercurial - https://wiki.jenkins-ci.org/display/JENKINS/Mercurial+Plugin 52 | mercurial:1.54 53 | #credentials:1.9.4 54 | matrix-project:1.2 55 | multiple-scms:0.4-beta-1 56 | ssh-credentials:1.6 57 | # commented out as superseded by other plugins 58 | #scm-api:0.1 59 | 60 | # Pipeline Utility Steps Plugin - https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Utility+Steps+Plugin 61 | pipeline-utility-steps:1.1.5 62 | script-security:1.19 63 | # commented out as superseded by other plugins 64 | #workflow-cps:1.11 65 | #workflow-step-api:1.11 66 | 67 | # seem to be missing from the Jenkins docs but required to run these plugins.. 68 | structs:1.1 69 | git-client:1.19.6 70 | git-server:1.6 71 | plain-credentials:1.2 72 | ace-editor:1.1 73 | 74 | # Credentials binding plugin 75 | credentials-binding:1.7 76 | 77 | # OpenShift Pipeline Plugin 78 | openshift-pipeline:1.0.17 79 | 80 | # Parameterized Trigger Plugin 81 | parameterized-trigger:2.31 82 | conditional-buildstep:1.3.1 83 | token-macro:1.12.1 84 | run-condition:1.0 85 | -------------------------------------------------------------------------------- /infrastructure/jenkins/plugins/script-security.jpi.pinned: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/infrastructure/jenkins/plugins/script-security.jpi.pinned -------------------------------------------------------------------------------- /infrastructure/nexus/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/rhel7/rhel 2 | 3 | EXPOSE 8081 4 | 5 | ENV NEXUS_VERSION 2.13.0-01 6 | ENV NEXUS_HOME /opt/nexus/nexus 7 | ENV NEXUS_WORK /sonatype-work 8 | ENV NEXUS_REPOS /repositories 9 | 10 | 11 | # Run Yum Update 12 | RUN yum install -y java-1.8.0-openjdk-devel tar \ 13 | && yum clean all 14 | 15 | RUN mkdir -p ${NEXUS_HOME} \ 16 | && curl --fail --silent --location --retry 3 \ 17 | https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-${NEXUS_VERSION}-bundle.tar.gz \ 18 | | gunzip \ 19 | | tar x -C /tmp nexus-${NEXUS_VERSION} \ 20 | && mv /tmp/nexus-${NEXUS_VERSION}/* ${NEXUS_HOME}/ \ 21 | && rm -rf /tmp/nexus-${NEXUS_VERSION} \ 22 | && chmod 777 $NEXUS_HOME \ 23 | && mkdir -p $NEXUS_WORK && chmod -R 777 $NEXUS_WORK \ 24 | && mkdir -p $NEXUS_REPOS && chmod -R 777 $NEXUS_REPOS \ 25 | && groupadd -r nexus -g 185 && useradd -u 185 -r -g nexus -m -d /home/jboss -s /sbin/nologin -c "Nexus user" nexus 26 | 27 | COPY scripts/fix-permissions.sh scripts/startup.sh /usr/local/bin/ 28 | COPY conf/nexus.xml $NEXUS_HOME/conf/ 29 | 30 | RUN chmod 755 /usr/local/bin/fix-permissions.sh \ 31 | && /usr/local/bin/fix-permissions.sh /opt/nexus \ 32 | && /usr/local/bin/fix-permissions.sh $NEXUS_WORK \ 33 | && /usr/local/bin/fix-permissions.sh $NEXUS_REPOS \ 34 | && /usr/local/bin/fix-permissions.sh $NEXUS_HOME/conf \ 35 | && /usr/local/bin/fix-permissions.sh /usr/local/bin/startup.sh 36 | 37 | 38 | VOLUME ["/sonatype-work"] 39 | VOLUME ["/repositories"] 40 | 41 | WORKDIR $NEXUS_HOME 42 | 43 | USER 185 44 | 45 | WORKDIR $NEXUS_HOME 46 | ENV CONTEXT_PATH / 47 | ENV MAX_HEAP 768m 48 | ENV MIN_HEAP 256m 49 | ENV JAVA_OPTS -server -XX:MaxPermSize=192m -Djava.net.preferIPv4Stack=true 50 | ENV LAUNCHER_CONF ${NEXUS_HOME}/conf/jetty.xml ${NEXUS_HOME}/conf/jetty-requestlog.xml 51 | 52 | CMD /usr/local/bin/startup.sh -------------------------------------------------------------------------------- /infrastructure/nexus/README.md: -------------------------------------------------------------------------------- 1 | Nexus Docker Container 2 | =================== 3 | 4 | Preconfigured Sonatype Nexus Docker image to proxy external repositories and to store artifacts 5 | 6 | # Building and Running with Docker 7 | 8 | Build the image by running the following command within this directory: 9 | 10 | docker build -t ose-bdd-demo/nexus 11 | 12 | Launch an instance of the newly created image 13 | 14 | docker run -it --rm -p 8081:8081 ose-bdd-demo/nexus 15 | 16 | Nexus will be available at http://<DOCKER_IP>:8081 17 | 18 | # Building in OpenShift 19 | 20 | Login to OpenShift and create a new project or use an existing project 21 | 22 | Create a new build of the application by running the following commands within this directory 23 | 24 | oc new-build registry.access.redhat.com/rhel7/rhel --name=nexus --binary=true 25 | 26 | Start a new build of the Nexus image 27 | 28 | oc start-build nexus --from-dir=. 29 | 30 | Once the build has completed, launch a new application 31 | 32 | oc new-app nexus 33 | 34 | Expose the service so that the application is accessible externally 35 | 36 | oc expose svc nexus 37 | 38 | Nexus will be available at http://nexus.<PROJECT>.<DEFAULT_SUBDOMAIN> -------------------------------------------------------------------------------- /infrastructure/nexus/scripts/fix-permissions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ -z $1 ] && echo "You must specify path for fixing permissions" && exit 1 4 | 5 | # Fixes permissions in folders 6 | for i in `find $1 -type d` 7 | do 8 | [ -r $i ] && chmod go+r $i 9 | [ -w $i ] && chmod go+w $i 10 | [ -x $i ] && chmod go+x $i 11 | done 12 | 13 | # Goes up directories to root 14 | f=$1 15 | while [[ $f != "/" ]]; do chmod go+wx $f; f=$(dirname $f); done; 16 | 17 | # Fixes permissions in files 18 | for i in `find $1 -type f` 19 | do 20 | [ -r $i ] && chmod go+r $i 21 | [ -w $i ] && chmod go+w $i 22 | [ -x $i ] && chmod go+x $i 23 | done 24 | 25 | exit 0 -------------------------------------------------------------------------------- /infrastructure/nexus/scripts/startup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Startup Script 4 | 5 | # Copy configuration file if not present 6 | mkdir -p $NEXUS_WORK/conf 7 | 8 | if [ ! -f $NEXUS_WORK/conf/nexus.xml ]; then 9 | cp -f $NEXUS_HOME/conf/nexus.xml $NEXUS_WORK/conf/ 10 | fi 11 | 12 | # Start Nexus 13 | exec java \ 14 | -Dnexus-work=${NEXUS_WORK} -Dnexus-webapp-context-path=${CONTEXT_PATH} -Dapplication-conf=${NEXUS_HOME}/conf \ 15 | -Xms${MIN_HEAP} -Xmx${MAX_HEAP} \ 16 | -cp '/opt/nexus/nexus/conf/:/opt/nexus/nexus/lib/*' \ 17 | ${JAVA_OPTS} \ 18 | org.sonatype.nexus.bootstrap.Launcher ${LAUNCHER_CONF} -------------------------------------------------------------------------------- /ose-api-app/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | *.m4v 3 | .DS_Store 4 | RemoteSystemsTempFiles/ 5 | .index/ 6 | *.zip 7 | repository/ 8 | *.tar 9 | .classpath 10 | .project 11 | .settings 12 | -------------------------------------------------------------------------------- /ose-api-app/Jenkinsfile: -------------------------------------------------------------------------------- 1 | 2 | def appName = "ose-api-app" 3 | def devProject = "api-app-dev" 4 | def uatProject = "api-app-uat" 5 | def prodProject = "api-app-prod" 6 | def version 7 | 8 | node('ose-agent') { 9 | 10 | def WORKSPACE = pwd() 11 | def mvnHome = tool 'maven' 12 | env.KUBECONFIG = pwd() + "/.kubeconfig" 13 | 14 | stage 'Checkout' 15 | 16 | checkout scm 17 | 18 | stage 'Maven Build' 19 | 20 | try { 21 | sh """ 22 | set +x 23 | ${mvnHome}/bin/mvn build-helper:parse-version versions:set -DnewVersion=\\\${parsedVersion.majorVersion}.\\\${parsedVersion.minorVersion}.\\\${parsedVersion.incrementalVersion}-\${BUILD_NUMBER} 24 | ${mvnHome}/bin/mvn clean install 25 | """ 26 | 27 | step([$class: 'ArtifactArchiver', artifacts: '**/target/*.war, **/target/*.jar', fingerprint: true]) 28 | } 29 | catch(e) { 30 | currentBuild.result = 'FAILURE' 31 | throw e 32 | } 33 | finally { 34 | processStageResult() 35 | } 36 | 37 | stage "OpenShift Dev Build" 38 | 39 | version = parseVersion("${WORKSPACE}/pom.xml") 40 | 41 | login() 42 | 43 | sh """ 44 | set +x 45 | 46 | currentOutputName=\$(oc get bc ${appName} -n ${devProject} --template='{{ .spec.output.to.name }}') 47 | 48 | newImageName=\${currentOutputName%:*}:${version} 49 | 50 | oc patch bc ${appName} -n ${devProject} -p "{ \\"spec\\": { \\"output\\": { \\"to\\": { \\"name\\": \\"\${newImageName}\\" } } } }" 51 | 52 | mkdir -p ${WORKSPACE}//target/s2i-build/deployments 53 | cp ${WORKSPACE}//target/*.jar ${WORKSPACE}//target/s2i-build/deployments/ 54 | oc start-build ${appName} -n ${devProject} --follow=true --wait=true --from-dir="${WORKSPACE}//target/s2i-build" 55 | 56 | """ 57 | 58 | stage "Dev Deployment" 59 | 60 | login() 61 | 62 | deployApp(appName, devProject, version) 63 | 64 | validateDeployment(appName,devProject) 65 | 66 | stage "Promote to UAT" 67 | 68 | login() 69 | 70 | sh """ 71 | set +x 72 | 73 | echo "Promoting application to UAT Environment" 74 | 75 | oc tag ${devProject}/${appName}:${version} ${uatProject}/${appName}:${version} 76 | 77 | # Sleep for a few moments 78 | sleep 5 79 | 80 | """ 81 | 82 | deployApp(appName, uatProject, version) 83 | 84 | validateDeployment(appName,uatProject) 85 | 86 | stage "Acceptance Checking" 87 | 88 | acceptanceCheck(appName, uatProject) 89 | } 90 | 91 | stage "Promote to Production" 92 | 93 | input "Do you want to promote the ${appName} to Production?" 94 | 95 | node('ose-agent') { 96 | 97 | def WORKSPACE = pwd() 98 | def mvnHome = tool 'maven' 99 | env.KUBECONFIG = pwd() + "/.kubeconfig" 100 | 101 | login() 102 | 103 | sh """ 104 | set +x 105 | 106 | echo "Promoting application to Prod Environment" 107 | 108 | oc tag ${uatProject}/${appName}:${version} ${prodProject}/${appName}:${version} 109 | 110 | # Sleep for a few moments 111 | sleep 5 112 | 113 | """ 114 | 115 | deployApp(appName, prodProject, version) 116 | 117 | validateDeployment(appName,prodProject) 118 | 119 | 120 | } 121 | 122 | def processStageResult() { 123 | 124 | if (currentBuild.result != null) { 125 | sh "exit 1" 126 | } 127 | } 128 | 129 | def login() { 130 | sh """ 131 | set +x 132 | oc login --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt --token=\$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) https://kubernetes.default.svc.cluster.local >/dev/null 2>&1 || echo 'OpenShift login failed' 133 | """ 134 | } 135 | 136 | def parseVersion(String filename) { 137 | def matcher = readFile(filename) =~ '(.+)' 138 | matcher ? matcher[0][1] : null 139 | } 140 | 141 | def deployApp(appName, namespace, version) { 142 | sh """ 143 | set +x 144 | 145 | newDeploymentImageName=${appName}:${version} 146 | 147 | imageReference=\$(oc get is ${appName} -n ${namespace} -o jsonpath="{.status.tags[?(@.tag==\\"${version}\\")].items[*].dockerImageReference}") 148 | 149 | oc patch dc/${appName} -n ${namespace} -p "{\\"spec\\":{\\"template\\":{\\"spec\\":{\\"containers\\":[{\\"name\\":\\"${appName}\\",\\"image\\": \\"\${imageReference}\\" } ]}}, \\"triggers\\": [ { \\"type\\": \\"ImageChange\\", \\"imageChangeParams\\": { \\"containerNames\\": [ \\"${appName}\\" ], \\"from\\": { \\"kind\\": \\"ImageStreamTag\\", \\"name\\": \\"\${newDeploymentImageName}\\" } } } ] }}" 150 | 151 | oc deploy ${appName} -n ${namespace} --latest 152 | 153 | # Sleep for a few moments 154 | sleep 5 155 | """ 156 | 157 | 158 | } 159 | 160 | def acceptanceCheck(String appName, String namespace) { 161 | 162 | sh """ 163 | set +x 164 | 165 | COUNTER=0 166 | DELAY=5 167 | MAX_COUNTER=30 168 | 169 | echo "Running Acceptance Check of ${appName} in project ${namespace}" 170 | 171 | set +e 172 | 173 | while [ \$COUNTER -lt \$MAX_COUNTER ] 174 | do 175 | 176 | RESPONSE=\$(curl -s -o /dev/null -w '%{http_code}\\n' http://${appName}.${namespace}.svc.cluster.local:8080/rest/api/pods) 177 | 178 | if [ \$RESPONSE -eq 200 ]; then 179 | echo 180 | echo "Application Verified" 181 | break 182 | fi 183 | 184 | if [ \$COUNTER -eq \$MAX_COUNTER ]; then 185 | echo "Max Validation Attempts Exceeded. Failed Verifying Application Deployment..." 186 | exit 1 187 | fi 188 | 189 | sleep \$DELAY 190 | 191 | done 192 | 193 | set -e 194 | """ 195 | 196 | } 197 | 198 | def validateDeployment(String dcName, String namespace) { 199 | 200 | sh """ 201 | set +x 202 | 203 | COUNTER=0 204 | DELAY=10 205 | MAX_COUNTER=30 206 | 207 | echo "Validating deployment of ${dcName} in project ${namespace}" 208 | 209 | LATEST_DC_VERSION=\$(oc get dc ${dcName} -n ${namespace} --template='{{ .status.latestVersion }}') 210 | 211 | RC_NAME=${dcName}-\${LATEST_DC_VERSION} 212 | 213 | set +e 214 | 215 | while [ \$COUNTER -lt \$MAX_COUNTER ] 216 | do 217 | 218 | RC_ANNOTATION_RESPONSE=\$(oc get rc -n ${namespace} \$RC_NAME --template="{{.metadata.annotations}}") 219 | 220 | echo "\$RC_ANNOTATION_RESPONSE" | grep openshift.io/deployment.phase:Complete >/dev/null 2>&1 221 | 222 | if [ \$? -eq 0 ]; then 223 | echo "Deployment Succeeded!" 224 | break 225 | fi 226 | 227 | echo "\$RC_ANNOTATION_RESPONSE" | grep -E 'openshift.io/deployment.phase:Failed|openshift.io/deployment.phase:Cancelled' >/dev/null 2>&1 228 | if [ \$? -eq 0 ]; then 229 | echo "Deployment Failed" 230 | exit 1 231 | fi 232 | 233 | if [ \$COUNTER -lt \$MAX_COUNTER ]; then 234 | 235 | echo -n "." 236 | COUNTER=\$(( \$COUNTER + 1 )) 237 | 238 | fi 239 | 240 | if [ \$COUNTER -eq \$MAX_COUNTER ]; then 241 | echo "Max Validation Attempts Exceeded. Failed Verifying Application Deployment..." 242 | exit 1 243 | fi 244 | 245 | sleep \$DELAY 246 | 247 | done 248 | 249 | set -e 250 | 251 | """ 252 | } 253 | -------------------------------------------------------------------------------- /ose-api-app/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 4.0.0 6 | com.redhat.summit16 7 | ose-api-app 8 | OpenShift API Viewer Example Application 9 | 1.0.0-SNAPSHOT 10 | war 11 | 12 | 13 | 1.0.0.Final 14 | 1.8 15 | 1.8 16 | false 17 | UTF-8 18 | 1.3.78 19 | 20 | 21 | 22 | 23 | 24 | org.wildfly.swarm 25 | bom 26 | ${version.wildfly.swarm} 27 | import 28 | pom 29 | 30 | 31 | 32 | 33 | 34 | ose-api-app 35 | 36 | 37 | org.wildfly.swarm 38 | wildfly-swarm-plugin 39 | ${version.wildfly.swarm} 40 | 41 | 42 | 43 | package 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | javax 55 | javaee-api 56 | 7.0 57 | provided 58 | 59 | 60 | 61 | org.wildfly.swarm 62 | jaxrs 63 | 64 | 65 | org.wildfly.swarm 66 | logging 67 | 68 | 69 | 70 | 71 | io.fabric8 72 | openshift-client 73 | ${version.io.fabric8_openshift-client} 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /ose-api-app/src/main/java/com/redhat/summit16/model/Environment.java: -------------------------------------------------------------------------------- 1 | package com.redhat.summit16.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Environment implements Serializable { 6 | 7 | private String namespace; 8 | private String name; 9 | 10 | public String getNamespace() { 11 | return namespace; 12 | } 13 | 14 | public void setNamespace(String namespace) { 15 | this.namespace = namespace; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public void setName(String name) { 23 | this.name = name; 24 | } 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /ose-api-app/src/main/java/com/redhat/summit16/rest/OpenShiftEndpoint.java: -------------------------------------------------------------------------------- 1 | package com.redhat.summit16.rest; 2 | 3 | import java.io.IOException; 4 | import java.nio.file.Files; 5 | import java.nio.file.Paths; 6 | import java.util.List; 7 | 8 | import javax.ws.rs.DELETE; 9 | import javax.ws.rs.GET; 10 | import javax.ws.rs.Path; 11 | import javax.ws.rs.PathParam; 12 | import javax.ws.rs.Produces; 13 | import javax.ws.rs.core.MediaType; 14 | import javax.ws.rs.core.Response; 15 | 16 | import org.slf4j.Logger; 17 | import org.slf4j.LoggerFactory; 18 | 19 | import com.redhat.summit16.model.Environment; 20 | 21 | import io.fabric8.kubernetes.api.model.Pod; 22 | import io.fabric8.openshift.api.model.DeploymentConfig; 23 | import io.fabric8.openshift.client.DefaultOpenShiftClient; 24 | import io.fabric8.openshift.client.OpenShiftClient; 25 | 26 | @Path("/api") 27 | public class OpenShiftEndpoint { 28 | 29 | private static final String TEST_MODE_PROP = "OSE_CICD_TEST_MODE"; 30 | private static final String APP_POD_NAME_PROP = "APP_POD_NAME"; 31 | private static final String APP_POD_NAMESPACE_PROP = "APP_POD_NAMESPACE"; 32 | 33 | private static String podNamespace; 34 | private static String podName; 35 | 36 | private static OpenShiftClient client; 37 | 38 | private static final Logger LOGGER = LoggerFactory.getLogger(OpenShiftEndpoint.class); 39 | 40 | 41 | @GET 42 | @Path("environment") 43 | @Produces(MediaType.APPLICATION_JSON) 44 | public Environment getEnvironment() { 45 | Environment env = new Environment(); 46 | env.setNamespace(getPodNamespace()); 47 | env.setName(getPodName()); 48 | return env; 49 | } 50 | 51 | @GET 52 | @Path("pods") 53 | @Produces(MediaType.APPLICATION_JSON) 54 | public List getPods() { 55 | 56 | // List pods = new ArrayList(); 57 | 58 | String deploymentLabel = getClient().pods().inNamespace(getPodNamespace()).withName(getPodName()).get().getMetadata().getLabels().get("deployment"); 59 | 60 | List osePods = getClient().pods().inNamespace(getPodNamespace()).withLabel("deployment", deploymentLabel).list().getItems(); 61 | return osePods; 62 | // for(io.fabric8.kubernetes.api.model.Pod osePod : osePods) { 63 | // Pod pod = new Pod(); 64 | // pod.setName(osePod.getMetadata().getName()); 65 | // pod.setCreateTimestamp(osePod.getMetadata().getCreationTimestamp()); 66 | // } 67 | 68 | // return pods; 69 | } 70 | 71 | @GET 72 | @Path("scale/{replicas}") 73 | @Produces(MediaType.APPLICATION_JSON) 74 | public DeploymentConfig scale(@PathParam("replicas") Integer replicas) { 75 | 76 | String deploymentConfigName = getClient().pods().inNamespace(getPodNamespace()).withName(getPodName()).get().getMetadata().getAnnotations().get("openshift.io/deployment-config.name"); 77 | 78 | DeploymentConfig dc = getClient().deploymentConfigs().inNamespace(getPodNamespace()).withName(deploymentConfigName).edit().editSpec().withReplicas(replicas).endSpec().done(); 79 | 80 | return dc; 81 | 82 | } 83 | 84 | @GET 85 | @Path("scaleUp") 86 | @Produces(MediaType.APPLICATION_JSON) 87 | public DeploymentConfig scaleUp() { 88 | 89 | String deploymentConfigName = getClient().pods().inNamespace(getPodNamespace()).withName(getPodName()).get().getMetadata().getAnnotations().get("openshift.io/deployment-config.name"); 90 | 91 | DeploymentConfig origDc = getClient().deploymentConfigs().inNamespace(getPodNamespace()).withName(deploymentConfigName).get(); 92 | Integer replicas = origDc.getSpec().getReplicas(); 93 | 94 | DeploymentConfig updatedDc = getClient().deploymentConfigs().inNamespace(getPodNamespace()).withName(deploymentConfigName).edit().editSpec().withReplicas(++replicas).endSpec().done(); 95 | 96 | return updatedDc; 97 | 98 | } 99 | 100 | @GET 101 | @Path("scaleDown") 102 | @Produces(MediaType.APPLICATION_JSON) 103 | public DeploymentConfig scaleDown() { 104 | 105 | String deploymentConfigName = getClient().pods().inNamespace(getPodNamespace()).withName(getPodName()).get().getMetadata().getAnnotations().get("openshift.io/deployment-config.name"); 106 | 107 | DeploymentConfig origDc = getClient().deploymentConfigs().inNamespace(getPodNamespace()).withName(deploymentConfigName).get(); 108 | Integer replicas = origDc.getSpec().getReplicas(); 109 | 110 | if (replicas > 0) { 111 | DeploymentConfig updatedDc = getClient().deploymentConfigs().inNamespace(getPodNamespace()).withName(deploymentConfigName).edit().editSpec().withReplicas(--replicas).endSpec().done(); 112 | return updatedDc; 113 | } 114 | 115 | return origDc; 116 | 117 | } 118 | 119 | @DELETE 120 | @Path("pod/name/{name}") 121 | public Response deletePod(@PathParam("name") String name) { 122 | 123 | // Get Pod 124 | Pod pod = getClient().pods().inNamespace(getPodNamespace()).withName(name).get(); 125 | 126 | getClient().pods().inNamespace(getPodNamespace()).delete(pod); 127 | 128 | return Response.ok().build(); 129 | 130 | } 131 | 132 | 133 | 134 | 135 | private OpenShiftClient getClient() { 136 | 137 | if(client != null) { 138 | return client; 139 | } 140 | 141 | io.fabric8.kubernetes.client.Config config = new io.fabric8.kubernetes.client.Config(); 142 | 143 | // Testing Mode 144 | if(System.getenv(TEST_MODE_PROP) != null){ 145 | 146 | config.setMasterUrl("https://10.1.2.2:8443"); 147 | config.setCaCertFile("../local-testing/ca.crt"); 148 | java.nio.file.Path tokenFile = Paths.get("../local-testing/token"); 149 | 150 | String token = null; 151 | try { 152 | token = new String(Files.readAllBytes(tokenFile)); 153 | config.setOauthToken(token); 154 | } catch (IOException e) { 155 | LOGGER.error(e.getMessage(), e); 156 | } 157 | 158 | } 159 | 160 | client = new DefaultOpenShiftClient(config); 161 | 162 | return client; 163 | 164 | } 165 | 166 | private String getPodName() { 167 | 168 | if(podName == null) { 169 | podName = System.getenv(APP_POD_NAME_PROP); 170 | } 171 | 172 | return podName; 173 | 174 | } 175 | 176 | private String getPodNamespace() { 177 | if(podNamespace == null) { 178 | podNamespace = System.getenv(APP_POD_NAMESPACE_PROP); 179 | } 180 | 181 | return podNamespace; 182 | } 183 | 184 | 185 | 186 | } 187 | -------------------------------------------------------------------------------- /ose-api-app/src/main/java/com/redhat/summit16/rest/RestApplication.java: -------------------------------------------------------------------------------- 1 | package com.redhat.summit16.rest; 2 | 3 | import javax.ws.rs.core.Application; 4 | import javax.ws.rs.ApplicationPath; 5 | 6 | @ApplicationPath("/rest") 7 | public class RestApplication extends Application { 8 | } -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/brand/bootstrap-outline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 11 | 12 | 13 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/brand/bootstrap-punchout.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | 12 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/brand/bootstrap-solid.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/css/docs.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["docs/assets/css/ie10-viewport-bug-workaround.css","docs/assets/css/src/pygments-manni.css","docs/assets/css/src/docs.css"],"names":[],"mappings":";;;;AAYA,cAAoB,MAAO,aAC3B,aAAoB,MAAO,aAC3B,UAAoB,MAAO,aCd3B,KAAO,iBAAkB,KAEzB,GAAK,MAAO,KACZ,KAAO,MAAO,KAAS,iBAAkB,KACzC,GAAK,MAAO,KACZ,GAAK,MAAO,KACZ,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,iBAAkB,KAAS,OAAQ,IAAI,MAAM,KACnD,IAAM,WAAY,OAClB,IAAM,MAAO,IACb,IAAM,MAAO,KACb,IAAM,iBAAkB,KAAS,OAAQ,IAAI,MAAM,KACnD,IAAM,MAAO,KACb,IAAM,MAAO,KAEb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,GAAK,MAAO,KACZ,GAAK,MAAO,QACZ,IAAM,MAAO,QACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,QACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,GAAK,MAAO,KACZ,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KAAS,WAAY,OAClC,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,IAAM,MAAO,KACb,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AAK,MAClB,YAAa,KACb,MAAO,KACP,cAAe,IAEjB,6BACE,iBAAkB,QAEpB,iCACE,iBAAkB,QAGpB,yBACE,eACE,QAAS,WACT,MAAO,GAET,8BACE,WAAY,EACZ,YAAa,IAAI,MAAM,KAEzB,kBACE,UAAW,MASf,gBACE,SAAU,SACV,QAAS,KAEX,eACE,SAAU,SACV,IAAK,EACL,MAAO,EACP,QAAS,GACT,QAAS,MACT,QAAS,IAAI,IACb,UAAW,KACX,MAAO,QACP,OAAQ,QACR,iBAAkB,KAClB,OAAQ,IAAI,MAAM,QAClB,cAAe,EAAE,IAAI,EAAE,IAEzB,qBACE,MAAO,KACP,iBAAkB,QAClB,aAAc,QAGhB,yBACE,gBACE,QAAS,MAEX,2CACE,IAAK,MACL,wBAAyB,GAO7B,eACE,MAAO,QAGT,yBACE,eACE,QAAS,MAIb,sBACE,QAAS,IACT,mBAAoB,MAAM,KAAK,OAC1B,cAAe,MAAM,KAAK,OACvB,WAAY,MAAM,KAAK,OAIjC,qBADA,4BAEE,gBAAiB,KACjB,QAAS,EAUX,cACE,aAAc,KACd,aAAoK,oBACpK,QAAS,EACT,QAAS,KAAK,SACd,mBAAsL,EAAE,EAAE,IAAI,oBACtL,WAAY,EAAE,EAAE,IAAI"} -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/css/ie10-viewport-bug-workaround.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * IE10 viewport hack for Surface/desktop Windows 8 bug 3 | * Copyright 2014-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | /* 8 | * See the Getting Started docs for more information: 9 | * http://getbootstrap.com/getting-started/#support-ie10-width 10 | */ 11 | @-webkit-viewport { width: device-width; } 12 | @-moz-viewport { width: device-width; } 13 | @-ms-viewport { width: device-width; } 14 | @-o-viewport { width: device-width; } 15 | @viewport { width: device-width; } 16 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/css/src/pygments-manni.css: -------------------------------------------------------------------------------- 1 | .hll { background-color: #ffffcc } 2 | /*{ background: #f0f3f3; }*/ 3 | .c { color: #999; } /* Comment */ 4 | .err { color: #AA0000; background-color: #FFAAAA } /* Error */ 5 | .k { color: #006699; } /* Keyword */ 6 | .o { color: #555555 } /* Operator */ 7 | .cm { color: #999; } /* Comment.Multiline */ /* Edited to remove italics and make into comment */ 8 | .cp { color: #009999 } /* Comment.Preproc */ 9 | .c1 { color: #999; } /* Comment.Single */ 10 | .cs { color: #999; } /* Comment.Special */ 11 | .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ 12 | .ge { font-style: italic } /* Generic.Emph */ 13 | .gr { color: #FF0000 } /* Generic.Error */ 14 | .gh { color: #003300; } /* Generic.Heading */ 15 | .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ 16 | .go { color: #AAAAAA } /* Generic.Output */ 17 | .gp { color: #000099; } /* Generic.Prompt */ 18 | .gs { } /* Generic.Strong */ 19 | .gu { color: #003300; } /* Generic.Subheading */ 20 | .gt { color: #99CC66 } /* Generic.Traceback */ 21 | .kc { color: #006699; } /* Keyword.Constant */ 22 | .kd { color: #006699; } /* Keyword.Declaration */ 23 | .kn { color: #006699; } /* Keyword.Namespace */ 24 | .kp { color: #006699 } /* Keyword.Pseudo */ 25 | .kr { color: #006699; } /* Keyword.Reserved */ 26 | .kt { color: #007788; } /* Keyword.Type */ 27 | .m { color: #FF6600 } /* Literal.Number */ 28 | .s { color: #d44950 } /* Literal.String */ 29 | .na { color: #4f9fcf } /* Name.Attribute */ 30 | .nb { color: #336666 } /* Name.Builtin */ 31 | .nc { color: #00AA88; } /* Name.Class */ 32 | .no { color: #336600 } /* Name.Constant */ 33 | .nd { color: #9999FF } /* Name.Decorator */ 34 | .ni { color: #999999; } /* Name.Entity */ 35 | .ne { color: #CC0000; } /* Name.Exception */ 36 | .nf { color: #CC00FF } /* Name.Function */ 37 | .nl { color: #9999FF } /* Name.Label */ 38 | .nn { color: #00CCFF; } /* Name.Namespace */ 39 | .nt { color: #2f6f9f; } /* Name.Tag */ 40 | .nv { color: #003333 } /* Name.Variable */ 41 | .ow { color: #000000; } /* Operator.Word */ 42 | .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .mf { color: #FF6600 } /* Literal.Number.Float */ 44 | .mh { color: #FF6600 } /* Literal.Number.Hex */ 45 | .mi { color: #FF6600 } /* Literal.Number.Integer */ 46 | .mo { color: #FF6600 } /* Literal.Number.Oct */ 47 | .sb { color: #CC3300 } /* Literal.String.Backtick */ 48 | .sc { color: #CC3300 } /* Literal.String.Char */ 49 | .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ 50 | .s2 { color: #CC3300 } /* Literal.String.Double */ 51 | .se { color: #CC3300; } /* Literal.String.Escape */ 52 | .sh { color: #CC3300 } /* Literal.String.Heredoc */ 53 | .si { color: #AA0000 } /* Literal.String.Interpol */ 54 | .sx { color: #CC3300 } /* Literal.String.Other */ 55 | .sr { color: #33AAAA } /* Literal.String.Regex */ 56 | .s1 { color: #CC3300 } /* Literal.String.Single */ 57 | .ss { color: #FFCC33 } /* Literal.String.Symbol */ 58 | .bp { color: #336666 } /* Name.Builtin.Pseudo */ 59 | .vc { color: #003333 } /* Name.Variable.Class */ 60 | .vg { color: #003333 } /* Name.Variable.Global */ 61 | .vi { color: #003333 } /* Name.Variable.Instance */ 62 | .il { color: #FF6600 } /* Literal.Number.Integer.Long */ 63 | 64 | .css .o, 65 | .css .o + .nt, 66 | .css .nt + .nt { color: #999; } 67 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/flash/ZeroClipboard.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/assets/flash/ZeroClipboard.swf -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/img/components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/assets/img/components.png -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/img/devices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/assets/img/devices.png -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/img/expo-lyft.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/assets/img/expo-lyft.jpg -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/img/expo-newsweek.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/assets/img/expo-newsweek.jpg -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/img/expo-riot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/assets/img/expo-riot.jpg -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/img/expo-vogue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/assets/img/expo-vogue.jpg -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/img/sass-less.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/assets/img/sass-less.png -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/js/ie-emulation-modes-warning.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | /*! 5 | * Copyright 2014-2015 Twitter, Inc. 6 | * 7 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 8 | * details, see https://creativecommons.org/licenses/by/3.0/. 9 | */ 10 | // Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes. 11 | (function () { 12 | 'use strict'; 13 | 14 | function emulatedIEMajorVersion() { 15 | var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent) 16 | if (groups === null) { 17 | return null 18 | } 19 | var ieVersionNum = parseInt(groups[1], 10) 20 | var ieMajorVersion = Math.floor(ieVersionNum) 21 | return ieMajorVersion 22 | } 23 | 24 | function actualNonEmulatedIEMajorVersion() { 25 | // Detects the actual version of IE in use, even if it's in an older-IE emulation mode. 26 | // IE JavaScript conditional compilation docs: https://msdn.microsoft.com/library/121hztk3%28v=vs.94%29.aspx 27 | // @cc_on docs: https://msdn.microsoft.com/library/8ka90k2e%28v=vs.94%29.aspx 28 | var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // jshint ignore:line 29 | if (jscriptVersion === undefined) { 30 | return 11 // IE11+ not in emulation mode 31 | } 32 | if (jscriptVersion < 9) { 33 | return 8 // IE8 (or lower; haven't tested on IE<8) 34 | } 35 | return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode 36 | } 37 | 38 | var ua = window.navigator.userAgent 39 | if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) { 40 | return // Opera, which might pretend to be IE 41 | } 42 | var emulated = emulatedIEMajorVersion() 43 | if (emulated === null) { 44 | return // Not IE 45 | } 46 | var nonEmulated = actualNonEmulatedIEMajorVersion() 47 | 48 | if (emulated !== nonEmulated) { 49 | window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!') 50 | } 51 | })(); 52 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/js/ie10-viewport-bug-workaround.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * IE10 viewport hack for Surface/desktop Windows 8 bug 3 | * Copyright 2014-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | // See the Getting Started docs for more information: 8 | // http://getbootstrap.com/getting-started/#support-ie10-width 9 | 10 | (function () { 11 | 'use strict'; 12 | 13 | if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 14 | var msViewportStyle = document.createElement('style') 15 | msViewportStyle.appendChild( 16 | document.createTextNode( 17 | '@-ms-viewport{width:auto!important}' 18 | ) 19 | ) 20 | document.querySelector('head').appendChild(msViewportStyle) 21 | } 22 | 23 | })(); 24 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/js/ie8-responsive-file-warning.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | /*! 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * 7 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 8 | * details, see https://creativecommons.org/licenses/by/3.0/. 9 | */ 10 | // Intended to prevent false-positive bug reports about responsive styling supposedly not working in IE8. 11 | if (window.location.protocol == 'file:') { 12 | window.alert('ERROR: Bootstrap\'s responsive CSS is disabled!\nSee getbootstrap.com/getting-started/#respond-file-proto for details.') 13 | } 14 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/js/src/application.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S ALL JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | 5 | /*! 6 | * JavaScript for Bootstrap's docs (http://getbootstrap.com) 7 | * Copyright 2011-2015 Twitter, Inc. 8 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 9 | * details, see https://creativecommons.org/licenses/by/3.0/. 10 | */ 11 | 12 | /* global ZeroClipboard, anchors */ 13 | 14 | !function ($) { 15 | 'use strict'; 16 | 17 | $(function () { 18 | 19 | // Scrollspy 20 | var $window = $(window) 21 | var $body = $(document.body) 22 | 23 | $body.scrollspy({ 24 | target: '.bs-docs-sidebar' 25 | }) 26 | $window.on('load', function () { 27 | $body.scrollspy('refresh') 28 | }) 29 | 30 | // Kill links 31 | $('.bs-docs-container [href=#]').click(function (e) { 32 | e.preventDefault() 33 | }) 34 | 35 | // Sidenav affixing 36 | setTimeout(function () { 37 | var $sideBar = $('.bs-docs-sidebar') 38 | 39 | $sideBar.affix({ 40 | offset: { 41 | top: function () { 42 | var offsetTop = $sideBar.offset().top 43 | var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10) 44 | var navOuterHeight = $('.bs-docs-nav').height() 45 | 46 | return (this.top = offsetTop - navOuterHeight - sideBarMargin) 47 | }, 48 | bottom: function () { 49 | return (this.bottom = $('.bs-docs-footer').outerHeight(true)) 50 | } 51 | } 52 | }) 53 | }, 100) 54 | 55 | setTimeout(function () { 56 | $('.bs-top').affix() 57 | }, 100) 58 | 59 | // theme toggler 60 | ;(function () { 61 | var $stylesheetLink = $('#bs-theme-stylesheet') 62 | var $themeBtn = $('.bs-docs-theme-toggle') 63 | 64 | var activateTheme = function () { 65 | $stylesheetLink.attr('href', $stylesheetLink.attr('data-href')) 66 | $themeBtn.text('Disable theme preview') 67 | localStorage.setItem('previewTheme', true) 68 | } 69 | 70 | if (localStorage.getItem('previewTheme')) { 71 | activateTheme() 72 | } 73 | 74 | $themeBtn.click(function () { 75 | var href = $stylesheetLink.attr('href') 76 | if (!href || href.indexOf('data') === 0) { 77 | activateTheme() 78 | } else { 79 | $stylesheetLink.attr('href', '') 80 | $themeBtn.text('Preview theme') 81 | localStorage.removeItem('previewTheme') 82 | } 83 | }) 84 | })(); 85 | 86 | // Tooltip and popover demos 87 | $('.tooltip-demo').tooltip({ 88 | selector: '[data-toggle="tooltip"]', 89 | container: 'body' 90 | }) 91 | $('.popover-demo').popover({ 92 | selector: '[data-toggle="popover"]', 93 | container: 'body' 94 | }) 95 | 96 | // Demos within modals 97 | $('.tooltip-test').tooltip() 98 | $('.popover-test').popover() 99 | 100 | // Popover demos 101 | $('.bs-docs-popover').popover() 102 | 103 | // Button state demo 104 | $('#loading-example-btn').on('click', function () { 105 | var $btn = $(this) 106 | $btn.button('loading') 107 | setTimeout(function () { 108 | $btn.button('reset') 109 | }, 3000) 110 | }) 111 | 112 | // Modal relatedTarget demo 113 | $('#exampleModal').on('show.bs.modal', function (event) { 114 | var $button = $(event.relatedTarget) // Button that triggered the modal 115 | var recipient = $button.data('whatever') // Extract info from data-* attributes 116 | // If necessary, you could initiate an AJAX request here (and then do the updating in a callback). 117 | // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead. 118 | var $modal = $(this) 119 | $modal.find('.modal-title').text('New message to ' + recipient) 120 | $modal.find('.modal-body input').val(recipient) 121 | }) 122 | 123 | // Activate animated progress bar 124 | $('.bs-docs-activate-animated-progressbar').on('click', function () { 125 | $(this).siblings('.progress').find('.progress-bar-striped').toggleClass('active') 126 | }) 127 | 128 | // Config ZeroClipboard 129 | ZeroClipboard.config({ 130 | moviePath: '/assets/flash/ZeroClipboard.swf', 131 | hoverClass: 'btn-clipboard-hover' 132 | }) 133 | 134 | // Insert copy to clipboard button before .highlight 135 | $('.highlight').each(function () { 136 | var btnHtml = '
Copy
' 137 | $(this).before(btnHtml) 138 | }) 139 | var zeroClipboard = new ZeroClipboard($('.btn-clipboard')) 140 | var $htmlBridge = $('#global-zeroclipboard-html-bridge') 141 | 142 | // Handlers for ZeroClipboard 143 | zeroClipboard.on('load', function () { 144 | $htmlBridge 145 | .data('placement', 'top') 146 | .attr('title', 'Copy to clipboard') 147 | .tooltip() 148 | 149 | 150 | // Copy to clipboard 151 | zeroClipboard.on('dataRequested', function (client) { 152 | var highlight = $(this).parent().nextAll('.highlight').first() 153 | client.setText(highlight.text()) 154 | }) 155 | 156 | // Notify copy success and reset tooltip title 157 | zeroClipboard.on('complete', function () { 158 | $htmlBridge 159 | .attr('title', 'Copied!') 160 | .tooltip('fixTitle') 161 | .tooltip('show') 162 | .attr('title', 'Copy to clipboard') 163 | .tooltip('fixTitle') 164 | }) 165 | }) 166 | 167 | // Hide copy button when no Flash is found 168 | // or wrong Flash version is present 169 | zeroClipboard.on('noflash wrongflash', function () { 170 | $('.zero-clipboard').remove() 171 | ZeroClipboard.destroy() 172 | }) 173 | 174 | }) 175 | 176 | }(jQuery) 177 | 178 | ;(function () { 179 | 'use strict'; 180 | 181 | anchors.options.placement = 'left'; 182 | anchors.add('.bs-docs-section > h1, .bs-docs-section > h2, .bs-docs-section > h3, .bs-docs-section > h4, .bs-docs-section > h5') 183 | })(); 184 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/js/vendor/Blob.js: -------------------------------------------------------------------------------- 1 | /* Blob.js 2 | * A Blob implementation. 3 | * 2014-07-24 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * By Devin Samarin, https://github.com/dsamarin 7 | * License: X11/MIT 8 | * See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md 9 | */ 10 | 11 | /*global self, unescape */ 12 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 13 | plusplus: true */ 14 | 15 | /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */ 16 | 17 | (function (view) { 18 | "use strict"; 19 | 20 | view.URL = view.URL || view.webkitURL; 21 | 22 | if (view.Blob && view.URL) { 23 | try { 24 | new Blob; 25 | return; 26 | } catch (e) {} 27 | } 28 | 29 | // Internally we use a BlobBuilder implementation to base Blob off of 30 | // in order to support older browsers that only have BlobBuilder 31 | var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) { 32 | var 33 | get_class = function(object) { 34 | return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1]; 35 | } 36 | , FakeBlobBuilder = function BlobBuilder() { 37 | this.data = []; 38 | } 39 | , FakeBlob = function Blob(data, type, encoding) { 40 | this.data = data; 41 | this.size = data.length; 42 | this.type = type; 43 | this.encoding = encoding; 44 | } 45 | , FBB_proto = FakeBlobBuilder.prototype 46 | , FB_proto = FakeBlob.prototype 47 | , FileReaderSync = view.FileReaderSync 48 | , FileException = function(type) { 49 | this.code = this[this.name = type]; 50 | } 51 | , file_ex_codes = ( 52 | "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " 53 | + "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR" 54 | ).split(" ") 55 | , file_ex_code = file_ex_codes.length 56 | , real_URL = view.URL || view.webkitURL || view 57 | , real_create_object_URL = real_URL.createObjectURL 58 | , real_revoke_object_URL = real_URL.revokeObjectURL 59 | , URL = real_URL 60 | , btoa = view.btoa 61 | , atob = view.atob 62 | 63 | , ArrayBuffer = view.ArrayBuffer 64 | , Uint8Array = view.Uint8Array 65 | 66 | , origin = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/ 67 | ; 68 | FakeBlob.fake = FB_proto.fake = true; 69 | while (file_ex_code--) { 70 | FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1; 71 | } 72 | // Polyfill URL 73 | if (!real_URL.createObjectURL) { 74 | URL = view.URL = function(uri) { 75 | var 76 | uri_info = document.createElementNS("http://www.w3.org/1999/xhtml", "a") 77 | , uri_origin 78 | ; 79 | uri_info.href = uri; 80 | if (!("origin" in uri_info)) { 81 | if (uri_info.protocol.toLowerCase() === "data:") { 82 | uri_info.origin = null; 83 | } else { 84 | uri_origin = uri.match(origin); 85 | uri_info.origin = uri_origin && uri_origin[1]; 86 | } 87 | } 88 | return uri_info; 89 | }; 90 | } 91 | URL.createObjectURL = function(blob) { 92 | var 93 | type = blob.type 94 | , data_URI_header 95 | ; 96 | if (type === null) { 97 | type = "application/octet-stream"; 98 | } 99 | if (blob instanceof FakeBlob) { 100 | data_URI_header = "data:" + type; 101 | if (blob.encoding === "base64") { 102 | return data_URI_header + ";base64," + blob.data; 103 | } else if (blob.encoding === "URI") { 104 | return data_URI_header + "," + decodeURIComponent(blob.data); 105 | } if (btoa) { 106 | return data_URI_header + ";base64," + btoa(blob.data); 107 | } else { 108 | return data_URI_header + "," + encodeURIComponent(blob.data); 109 | } 110 | } else if (real_create_object_URL) { 111 | return real_create_object_URL.call(real_URL, blob); 112 | } 113 | }; 114 | URL.revokeObjectURL = function(object_URL) { 115 | if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) { 116 | real_revoke_object_URL.call(real_URL, object_URL); 117 | } 118 | }; 119 | FBB_proto.append = function(data/*, endings*/) { 120 | var bb = this.data; 121 | // decode data to a binary string 122 | if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) { 123 | var 124 | str = "" 125 | , buf = new Uint8Array(data) 126 | , i = 0 127 | , buf_len = buf.length 128 | ; 129 | for (; i < buf_len; i++) { 130 | str += String.fromCharCode(buf[i]); 131 | } 132 | bb.push(str); 133 | } else if (get_class(data) === "Blob" || get_class(data) === "File") { 134 | if (FileReaderSync) { 135 | var fr = new FileReaderSync; 136 | bb.push(fr.readAsBinaryString(data)); 137 | } else { 138 | // async FileReader won't work as BlobBuilder is sync 139 | throw new FileException("NOT_READABLE_ERR"); 140 | } 141 | } else if (data instanceof FakeBlob) { 142 | if (data.encoding === "base64" && atob) { 143 | bb.push(atob(data.data)); 144 | } else if (data.encoding === "URI") { 145 | bb.push(decodeURIComponent(data.data)); 146 | } else if (data.encoding === "raw") { 147 | bb.push(data.data); 148 | } 149 | } else { 150 | if (typeof data !== "string") { 151 | data += ""; // convert unsupported types to strings 152 | } 153 | // decode UTF-16 to binary string 154 | bb.push(unescape(encodeURIComponent(data))); 155 | } 156 | }; 157 | FBB_proto.getBlob = function(type) { 158 | if (!arguments.length) { 159 | type = null; 160 | } 161 | return new FakeBlob(this.data.join(""), type, "raw"); 162 | }; 163 | FBB_proto.toString = function() { 164 | return "[object BlobBuilder]"; 165 | }; 166 | FB_proto.slice = function(start, end, type) { 167 | var args = arguments.length; 168 | if (args < 3) { 169 | type = null; 170 | } 171 | return new FakeBlob( 172 | this.data.slice(start, args > 1 ? end : this.data.length) 173 | , type 174 | , this.encoding 175 | ); 176 | }; 177 | FB_proto.toString = function() { 178 | return "[object Blob]"; 179 | }; 180 | FB_proto.close = function() { 181 | this.size = 0; 182 | delete this.data; 183 | }; 184 | return FakeBlobBuilder; 185 | }(view)); 186 | 187 | view.Blob = function(blobParts, options) { 188 | var type = options ? (options.type || "") : ""; 189 | var builder = new BlobBuilder(); 190 | if (blobParts) { 191 | for (var i = 0, len = blobParts.length; i < len; i++) { 192 | if (Uint8Array && blobParts[i] instanceof Uint8Array) { 193 | builder.append(blobParts[i].buffer); 194 | } 195 | else { 196 | builder.append(blobParts[i]); 197 | } 198 | } 199 | } 200 | var blob = builder.getBlob(type); 201 | if (!blob.slice && blob.webkitSlice) { 202 | blob.slice = blob.webkitSlice; 203 | } 204 | return blob; 205 | }; 206 | 207 | var getPrototypeOf = Object.getPrototypeOf || function(object) { 208 | return object.__proto__; 209 | }; 210 | view.Blob.prototype = getPrototypeOf(new view.Blob()); 211 | }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this)); 212 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/js/vendor/FileSaver.js: -------------------------------------------------------------------------------- 1 | /* FileSaver.js 2 | * A saveAs() FileSaver implementation. 3 | * 2015-03-04 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * License: X11/MIT 7 | * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md 8 | */ 9 | 10 | /*global self */ 11 | /*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */ 12 | 13 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ 14 | 15 | var saveAs = saveAs 16 | // IE 10+ (native saveAs) 17 | || (typeof navigator !== "undefined" && 18 | navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator)) 19 | // Everyone else 20 | || (function(view) { 21 | "use strict"; 22 | // IE <10 is explicitly unsupported 23 | if (typeof navigator !== "undefined" && 24 | /MSIE [1-9]\./.test(navigator.userAgent)) { 25 | return; 26 | } 27 | var 28 | doc = view.document 29 | // only get URL when necessary in case Blob.js hasn't overridden it yet 30 | , get_URL = function() { 31 | return view.URL || view.webkitURL || view; 32 | } 33 | , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") 34 | , can_use_save_link = "download" in save_link 35 | , click = function(node) { 36 | var event = doc.createEvent("MouseEvents"); 37 | event.initMouseEvent( 38 | "click", true, false, view, 0, 0, 0, 0, 0 39 | , false, false, false, false, 0, null 40 | ); 41 | node.dispatchEvent(event); 42 | } 43 | , webkit_req_fs = view.webkitRequestFileSystem 44 | , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem 45 | , throw_outside = function(ex) { 46 | (view.setImmediate || view.setTimeout)(function() { 47 | throw ex; 48 | }, 0); 49 | } 50 | , force_saveable_type = "application/octet-stream" 51 | , fs_min_size = 0 52 | // See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and 53 | // https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047 54 | // for the reasoning behind the timeout and revocation flow 55 | , arbitrary_revoke_timeout = 500 // in ms 56 | , revoke = function(file) { 57 | var revoker = function() { 58 | if (typeof file === "string") { // file is an object URL 59 | get_URL().revokeObjectURL(file); 60 | } else { // file is a File 61 | file.remove(); 62 | } 63 | }; 64 | if (view.chrome) { 65 | revoker(); 66 | } else { 67 | setTimeout(revoker, arbitrary_revoke_timeout); 68 | } 69 | } 70 | , dispatch = function(filesaver, event_types, event) { 71 | event_types = [].concat(event_types); 72 | var i = event_types.length; 73 | while (i--) { 74 | var listener = filesaver["on" + event_types[i]]; 75 | if (typeof listener === "function") { 76 | try { 77 | listener.call(filesaver, event || filesaver); 78 | } catch (ex) { 79 | throw_outside(ex); 80 | } 81 | } 82 | } 83 | } 84 | , FileSaver = function(blob, name) { 85 | // First try a.download, then web filesystem, then object URLs 86 | var 87 | filesaver = this 88 | , type = blob.type 89 | , blob_changed = false 90 | , object_url 91 | , target_view 92 | , dispatch_all = function() { 93 | dispatch(filesaver, "writestart progress write writeend".split(" ")); 94 | } 95 | // on any filesys errors revert to saving with object URLs 96 | , fs_error = function() { 97 | // don't create more object URLs than needed 98 | if (blob_changed || !object_url) { 99 | object_url = get_URL().createObjectURL(blob); 100 | } 101 | if (target_view) { 102 | target_view.location.href = object_url; 103 | } else { 104 | var new_tab = view.open(object_url, "_blank"); 105 | if (new_tab == undefined && typeof safari !== "undefined") { 106 | //Apple do not allow window.open, see http://bit.ly/1kZffRI 107 | view.location.href = object_url 108 | } 109 | } 110 | filesaver.readyState = filesaver.DONE; 111 | dispatch_all(); 112 | revoke(object_url); 113 | } 114 | , abortable = function(func) { 115 | return function() { 116 | if (filesaver.readyState !== filesaver.DONE) { 117 | return func.apply(this, arguments); 118 | } 119 | }; 120 | } 121 | , create_if_not_found = {create: true, exclusive: false} 122 | , slice 123 | ; 124 | filesaver.readyState = filesaver.INIT; 125 | if (!name) { 126 | name = "download"; 127 | } 128 | if (can_use_save_link) { 129 | object_url = get_URL().createObjectURL(blob); 130 | save_link.href = object_url; 131 | save_link.download = name; 132 | click(save_link); 133 | filesaver.readyState = filesaver.DONE; 134 | dispatch_all(); 135 | revoke(object_url); 136 | return; 137 | } 138 | // prepend BOM for UTF-8 XML and text/plain types 139 | if (/^\s*(?:text\/(?:plain|xml)|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { 140 | blob = new Blob(["\ufeff", blob], {type: blob.type}); 141 | } 142 | // Object and web filesystem URLs have a problem saving in Google Chrome when 143 | // viewed in a tab, so I force save with application/octet-stream 144 | // http://code.google.com/p/chromium/issues/detail?id=91158 145 | // Update: Google errantly closed 91158, I submitted it again: 146 | // https://code.google.com/p/chromium/issues/detail?id=389642 147 | if (view.chrome && type && type !== force_saveable_type) { 148 | slice = blob.slice || blob.webkitSlice; 149 | blob = slice.call(blob, 0, blob.size, force_saveable_type); 150 | blob_changed = true; 151 | } 152 | // Since I can't be sure that the guessed media type will trigger a download 153 | // in WebKit, I append .download to the filename. 154 | // https://bugs.webkit.org/show_bug.cgi?id=65440 155 | if (webkit_req_fs && name !== "download") { 156 | name += ".download"; 157 | } 158 | if (type === force_saveable_type || webkit_req_fs) { 159 | target_view = view; 160 | } 161 | if (!req_fs) { 162 | fs_error(); 163 | return; 164 | } 165 | fs_min_size += blob.size; 166 | req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) { 167 | fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) { 168 | var save = function() { 169 | dir.getFile(name, create_if_not_found, abortable(function(file) { 170 | file.createWriter(abortable(function(writer) { 171 | writer.onwriteend = function(event) { 172 | target_view.location.href = file.toURL(); 173 | filesaver.readyState = filesaver.DONE; 174 | dispatch(filesaver, "writeend", event); 175 | revoke(file); 176 | }; 177 | writer.onerror = function() { 178 | var error = writer.error; 179 | if (error.code !== error.ABORT_ERR) { 180 | fs_error(); 181 | } 182 | }; 183 | "writestart progress write abort".split(" ").forEach(function(event) { 184 | writer["on" + event] = filesaver["on" + event]; 185 | }); 186 | writer.write(blob); 187 | filesaver.abort = function() { 188 | writer.abort(); 189 | filesaver.readyState = filesaver.DONE; 190 | }; 191 | filesaver.readyState = filesaver.WRITING; 192 | }), fs_error); 193 | }), fs_error); 194 | }; 195 | dir.getFile(name, {create: false}, abortable(function(file) { 196 | // delete file if it already exists 197 | file.remove(); 198 | save(); 199 | }), abortable(function(ex) { 200 | if (ex.code === ex.NOT_FOUND_ERR) { 201 | save(); 202 | } else { 203 | fs_error(); 204 | } 205 | })); 206 | }), fs_error); 207 | }), fs_error); 208 | } 209 | , FS_proto = FileSaver.prototype 210 | , saveAs = function(blob, name) { 211 | return new FileSaver(blob, name); 212 | } 213 | ; 214 | FS_proto.abort = function() { 215 | var filesaver = this; 216 | filesaver.readyState = filesaver.DONE; 217 | dispatch(filesaver, "abort"); 218 | }; 219 | FS_proto.readyState = FS_proto.INIT = 0; 220 | FS_proto.WRITING = 1; 221 | FS_proto.DONE = 2; 222 | 223 | FS_proto.error = 224 | FS_proto.onwritestart = 225 | FS_proto.onprogress = 226 | FS_proto.onwrite = 227 | FS_proto.onabort = 228 | FS_proto.onerror = 229 | FS_proto.onwriteend = 230 | null; 231 | 232 | return saveAs; 233 | }( 234 | typeof self !== "undefined" && self 235 | || typeof window !== "undefined" && window 236 | || this.content 237 | )); 238 | // `self` is undefined in Firefox for Android content script context 239 | // while `this` is nsIContentFrameMessageManager 240 | // with an attribute `content` that corresponds to the window 241 | 242 | if (typeof module !== "undefined" && module.exports) { 243 | module.exports.saveAs = saveAs; 244 | } else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) { 245 | define([], function() { 246 | return saveAs; 247 | }); 248 | } 249 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/js/vendor/anchor.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * AnchorJS - v1.0.1 - 2015-05-15 3 | * https://github.com/bryanbraun/anchorjs 4 | * Copyright (c) 2015 Bryan Braun; Licensed MIT 5 | */ 6 | 7 | function AnchorJS(options) { 8 | 'use strict'; 9 | 10 | this.options = options || {}; 11 | 12 | this._applyRemainingDefaultOptions = function(opts) { 13 | this.options.icon = this.options.hasOwnProperty('icon') ? opts.icon : ''; // Accepts characters (and also URLs?), like '#', '¶', '❡', or '§'. 14 | this.options.visible = this.options.hasOwnProperty('visible') ? opts.visible : 'hover'; // Also accepts 'always' 15 | this.options.placement = this.options.hasOwnProperty('placement') ? opts.placement : 'right'; // Also accepts 'left' 16 | this.options.class = this.options.hasOwnProperty('class') ? opts.class : ''; // Accepts any class name. 17 | }; 18 | 19 | this._applyRemainingDefaultOptions(options); 20 | 21 | this.add = function(selector) { 22 | var elements, 23 | elsWithIds, 24 | idList, 25 | elementID, 26 | i, 27 | roughText, 28 | tidyText, 29 | index, 30 | count, 31 | newTidyText, 32 | readableID, 33 | anchor, 34 | div, 35 | anchorNodes; 36 | 37 | this._applyRemainingDefaultOptions(this.options); 38 | 39 | // Provide a sensible default selector, if none is given. 40 | if (!selector) { 41 | selector = 'h1, h2, h3, h4, h5, h6'; 42 | } else if (typeof selector !== 'string') { 43 | throw new Error('The selector provided to AnchorJS was invalid.'); 44 | } 45 | 46 | elements = document.querySelectorAll(selector); 47 | if (elements.length === 0) { 48 | return false; 49 | } 50 | 51 | this._addBaselineStyles(); 52 | 53 | // We produce a list of existing IDs so we don't generate a duplicate. 54 | elsWithIds = document.querySelectorAll('[id]'); 55 | idList = [].map.call(elsWithIds, function assign(el) { 56 | return el.id; 57 | }); 58 | 59 | for (i = 0; i < elements.length; i++) { 60 | 61 | if (elements[i].hasAttribute('id')) { 62 | elementID = elements[i].getAttribute('id'); 63 | } else { 64 | roughText = elements[i].textContent; 65 | 66 | // Refine it so it makes a good ID. Strip out non-safe characters, replace 67 | // spaces with hyphens, truncate to 32 characters, and make toLowerCase. 68 | // 69 | // Example string: // '⚡⚡⚡ Unicode icons are cool--but don't belong in a URL.' 70 | tidyText = roughText.replace(/[^\w\s-]/gi, '') // ' Unicode icons are cool--but dont belong in a URL' 71 | .replace(/\s+/g, '-') // '-Unicode-icons-are-cool--but-dont-belong-in-a-URL' 72 | .replace(/-{2,}/g, '-') // '-Unicode-icons-are-cool-but-dont-belong-in-a-URL' 73 | .substring(0, 32) // '-Unicode-icons-are-cool-but-dont' 74 | .replace(/^-+|-+$/gm, '') // 'Unicode-icons-are-cool-but-dont' 75 | .toLowerCase(); // 'unicode-icons-are-cool-but-dont' 76 | 77 | // Compare our generated ID to existing IDs (and increment it if needed) 78 | // before we add it to the page. 79 | newTidyText = tidyText; 80 | count = 0; 81 | do { 82 | if (index !== undefined) { 83 | newTidyText = tidyText + '-' + count; 84 | } 85 | // .indexOf is supported in IE9+. 86 | index = idList.indexOf(newTidyText); 87 | count += 1; 88 | } while (index !== -1); 89 | index = undefined; 90 | idList.push(newTidyText); 91 | 92 | // Assign it to our element. 93 | // Currently the setAttribute element is only supported in IE9 and above. 94 | elements[i].setAttribute('id', newTidyText); 95 | 96 | elementID = newTidyText; 97 | } 98 | 99 | readableID = elementID.replace(/-/g, ' '); 100 | 101 | anchor = ''; 102 | 103 | div = document.createElement('div'); 104 | div.innerHTML = anchor; 105 | anchorNodes = div.childNodes; 106 | 107 | if (this.options.visible === 'always') { 108 | anchorNodes[0].style.opacity = '1'; 109 | } 110 | 111 | if (this.options.icon === '') { 112 | anchorNodes[0].style.fontFamily = 'anchorjs-icons'; 113 | anchorNodes[0].style.fontStyle = 'normal'; 114 | anchorNodes[0].style.fontVariant = 'normal'; 115 | anchorNodes[0].style.fontWeight = 'normal'; 116 | } 117 | 118 | if (this.options.placement === 'left') { 119 | anchorNodes[0].style.position = 'absolute'; 120 | anchorNodes[0].style.marginLeft = '-1em'; 121 | anchorNodes[0].style.paddingRight = '0.5em'; 122 | elements[i].insertBefore(anchorNodes[0], elements[i].firstChild); 123 | } else { // if the option provided is `right` (or anything else). 124 | anchorNodes[0].style.paddingLeft = '0.375em'; 125 | elements[i].appendChild(anchorNodes[0]); 126 | } 127 | } 128 | 129 | return this; 130 | }; 131 | 132 | this.remove = function(selector) { 133 | var domAnchor, 134 | elements = document.querySelectorAll(selector); 135 | for (var i = 0; i < elements.length; i++) { 136 | domAnchor = elements[i].querySelector('.anchorjs-link'); 137 | if (domAnchor) { 138 | elements[i].removeChild(domAnchor); 139 | } 140 | } 141 | return this; 142 | }; 143 | 144 | this._addBaselineStyles = function() { 145 | // We don't want to add global baseline styles if they've been added before. 146 | if (document.head.querySelector('style.anchorjs') !== null) { 147 | return; 148 | } 149 | 150 | var style = document.createElement('style'), 151 | linkRule = 152 | ' .anchorjs-link {' + 153 | ' opacity: 0;' + 154 | ' text-decoration: none;' + 155 | ' -webkit-font-smoothing: antialiased;' + 156 | ' -moz-osx-font-smoothing: grayscale;' + 157 | ' }', 158 | hoverRule = 159 | ' *:hover > .anchorjs-link,' + 160 | ' .anchorjs-link:focus {' + 161 | ' opacity: 1;' + 162 | ' }', 163 | anchorjsLinkFontFace = 164 | ' @font-face {' + 165 | ' font-family: "anchorjs-icons";' + 166 | ' font-style: normal;' + 167 | ' font-weight: normal;' + // Icon from icomoon; 10px wide & 10px tall; 2 empty below & 4 above 168 | ' src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBTUAAAC8AAAAYGNtYXAWi9QdAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5Zgq29TcAAAF4AAABNGhlYWQEZM3pAAACrAAAADZoaGVhBhUDxgAAAuQAAAAkaG10eASAADEAAAMIAAAAFGxvY2EAKACuAAADHAAAAAxtYXhwAAgAVwAAAygAAAAgbmFtZQ5yJ3cAAANIAAAB2nBvc3QAAwAAAAAFJAAAACAAAwJAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpywPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6cv//f//AAAAAAAg6cv//f//AAH/4xY5AAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACADEARAJTAsAAKwBUAAABIiYnJjQ/AT4BMzIWFxYUDwEGIicmND8BNjQn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AAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format("truetype");' + 169 | ' }', 170 | pseudoElContent = 171 | ' [data-anchorjs-icon]::after {' + 172 | ' content: attr(data-anchorjs-icon);' + 173 | ' }', 174 | firstStyleEl; 175 | 176 | style.className = 'anchorjs'; 177 | style.appendChild(document.createTextNode('')); // Necessary for Webkit. 178 | 179 | // We place it in the head with the other style tags, if possible, so as to 180 | // not look out of place. We insert before the others so these styles can be 181 | // overridden if necessary. 182 | firstStyleEl = document.head.querySelector('[rel="stylesheet"], style'); 183 | if (firstStyleEl === undefined) { 184 | document.head.appendChild(style); 185 | } else { 186 | document.head.insertBefore(style, firstStyleEl); 187 | } 188 | 189 | style.sheet.insertRule(linkRule, style.sheet.cssRules.length); 190 | style.sheet.insertRule(hoverRule, style.sheet.cssRules.length); 191 | style.sheet.insertRule(pseudoElContent, style.sheet.cssRules.length); 192 | style.sheet.insertRule(anchorjsLinkFontFace, style.sheet.cssRules.length); 193 | }; 194 | } 195 | 196 | var anchors = new AnchorJS(); 197 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/assets/js/vendor/autoprefixer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/assets/js/vendor/autoprefixer.js -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/dist/css/bootstrap-theme.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,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AA,kDACA,OAAA,+GACA,kBAAA,SF+MJ,sBElLI,iBAAA,yKACA,iBAAA,oKACA,iBAAA,iKFyLJ,YACE,cAAA,IC9KA,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBDgLV,wBAAA,8BAAA,8BAGE,YAAA,EAAA,KAAA,EAAA,QEnOE,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFiOF,aAAA,QALF,+BAAA,qCAAA,qCAQI,YAAA,KAUJ,OCnME,mBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,EAAA,IAAA,IAAA,gBD4MV,8BE5PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyPJ,8BE7PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA"} -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sabre1041/summit2016-ose-cicd/28796f6b58f1d9fe7962824a7086529f821095fc/ose-api-app/src/main/webapp/dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | OSE CI/CD Demo - Red Hat Summit 2016 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 54 | 55 |
56 | 57 |
58 | 59 | 60 | 61 | 62 |
63 | 64 |
65 |
66 | 67 |
68 | 69 | 70 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/ose-cicd.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | 3 | var name; 4 | getPods(); 5 | 6 | function getPods() { 7 | $.ajax({ 8 | url: "/rest/api/pods", 9 | success: function(result) { 10 | $.each(result, function(i, item) { 11 | $("div.ose-podName").append(item.metadata.name); 12 | $("div.ose-podCreateTime").append(item.metadata.creationTimestamp); 13 | name = item.metadata.name; 14 | }); 15 | } 16 | }); 17 | } 18 | 19 | $("#scaleUpBtn").click(function() { 20 | $.ajax({ 21 | url: "/rest/api/scaleUp", 22 | success: function(result) { 23 | alert("Check to see pods scaled up."); 24 | } 25 | }); 26 | }); 27 | 28 | $("#scaleDownBtn").click(function() { 29 | $.ajax({ 30 | url: "/rest/api/scaleDown", 31 | success: function(result) { 32 | alert("Check to see pods scaled down."); 33 | } 34 | }); 35 | }); 36 | 37 | $("#deleteBtn").click(function() { 38 | console.log(name); 39 | $.ajax({ 40 | url: "/rest/api/pod/name/" + name, 41 | type: "DELETE", 42 | success: function(result) { 43 | alert("Check to see pod(s) deleted."); 44 | } 45 | }); 46 | }); 47 | 48 | $("#refreshBtn").click(function() { 49 | $("div.ose-podName").html(""); 50 | $("div.ose-podCreateTime").html(""); 51 | getPods(); 52 | }); 53 | 54 | }); -------------------------------------------------------------------------------- /ose-api-app/src/main/webapp/starter-template.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | } 4 | .starter-template { 5 | padding: 40px 15px; 6 | text-align: center; 7 | } 8 | -------------------------------------------------------------------------------- /support/templates/app-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "app", 6 | "creationTimestamp": null, 7 | "annotations": { 8 | "description": "Template for the Application", 9 | "iconClass": "icon-jboss", 10 | "tags": "javaee,java" 11 | } 12 | }, 13 | "objects": [ 14 | { 15 | "kind": "Service", 16 | "apiVersion": "v1", 17 | "spec": { 18 | "ports": [ 19 | { 20 | "port": 8080, 21 | "targetPort": 8080 22 | } 23 | ], 24 | "selector": { 25 | "deploymentConfig": "${APPLICATION_NAME}" 26 | } 27 | }, 28 | "metadata": { 29 | "name": "${APPLICATION_NAME}", 30 | "labels": { 31 | "application": "${APPLICATION_NAME}" 32 | }, 33 | "annotations": { 34 | "description": "The web server's http port." 35 | } 36 | } 37 | }, 38 | { 39 | "kind": "Route", 40 | "apiVersion": "v1", 41 | "id": "${APPLICATION_NAME}", 42 | "metadata": { 43 | "name": "${APPLICATION_NAME}", 44 | "labels": { 45 | "application": "${APPLICATION_NAME}" 46 | }, 47 | "annotations": { 48 | "description": "Route for application's http service." 49 | } 50 | }, 51 | "spec": { 52 | "host": "${HOSTNAME_HTTP}", 53 | "to": { 54 | "name": "${APPLICATION_NAME}" 55 | } 56 | } 57 | }, 58 | { 59 | "kind": "ImageStream", 60 | "apiVersion": "v1", 61 | "metadata": { 62 | "name": "${APPLICATION_NAME}", 63 | "labels": { 64 | "application": "${APPLICATION_NAME}" 65 | } 66 | } 67 | }, 68 | { 69 | "kind": "BuildConfig", 70 | "apiVersion": "v1", 71 | "metadata": { 72 | "name": "${APPLICATION_NAME}", 73 | "labels": { 74 | "application": "${APPLICATION_NAME}" 75 | } 76 | }, 77 | "spec": { 78 | "source": { 79 | "type": "Binary", 80 | "binary": { 81 | "asFile": "" 82 | } 83 | }, 84 | "strategy": { 85 | "type": "Source", 86 | "sourceStrategy": { 87 | "from": { 88 | "kind": "ImageStreamTag", 89 | "namespace": "${IMAGE_STREAM_NAMESPACE}", 90 | "name": "${CUSTOM_BASE_IMAGE}:${CUSTOM_BASE_IMAGE_TAG}" 91 | } 92 | } 93 | }, 94 | "output": { 95 | "to": { 96 | "kind": "ImageStreamTag", 97 | "name": "${APPLICATION_NAME}:latest" 98 | } 99 | } 100 | } 101 | }, 102 | { 103 | "kind": "DeploymentConfig", 104 | "apiVersion": "v1", 105 | "metadata": { 106 | "name": "${APPLICATION_NAME}", 107 | "labels": { 108 | "application": "${APPLICATION_NAME}" 109 | } 110 | }, 111 | "spec": { 112 | "strategy": { 113 | "type": "Rolling", 114 | "rollingParams": { 115 | "updatePeriodSeconds": 1, 116 | "intervalSeconds": 1, 117 | "timeoutSeconds": 600, 118 | "maxUnavailable": "0%", 119 | "maxSurge": "20%" 120 | }, 121 | "resources": {} 122 | }, 123 | "triggers": [ 124 | { 125 | "type": "ImageChange", 126 | "imageChangeParams": { 127 | "automatic": true, 128 | "containerNames": [ 129 | "${APPLICATION_NAME}" 130 | ], 131 | "from": { 132 | "kind": "ImageStream", 133 | "name": "${APPLICATION_NAME}" 134 | } 135 | } 136 | }, 137 | { 138 | "type": "ConfigChange" 139 | } 140 | ], 141 | "replicas": 1, 142 | "selector": { 143 | "deploymentConfig": "${APPLICATION_NAME}" 144 | }, 145 | "template": { 146 | "metadata": { 147 | "name": "${APPLICATION_NAME}", 148 | "labels": { 149 | "deploymentConfig": "${APPLICATION_NAME}", 150 | "application": "${APPLICATION_NAME}" 151 | } 152 | }, 153 | "spec": { 154 | "terminationGracePeriodSeconds": 30, 155 | "containers": [ 156 | { 157 | "name": "${APPLICATION_NAME}", 158 | "image": "${APPLICATION_NAME}", 159 | "livenessProbe": { 160 | "httpGet": { 161 | "port": 8080, 162 | "path": "/" 163 | }, 164 | "initialDelaySeconds": 30, 165 | "timeoutSeconds": 1 166 | }, 167 | "readinessProbe": { 168 | "httpGet": { 169 | "port": 8080, 170 | "path": "/" 171 | }, 172 | "initialDelaySeconds": 5, 173 | "timeoutSeconds": 1 174 | }, 175 | "ports": [ 176 | { 177 | "name": "http", 178 | "containerPort": 8080, 179 | "protocol": "TCP" 180 | } 181 | ], 182 | "env": [ 183 | { 184 | "name": "APP_POD_NAME", 185 | "valueFrom": { 186 | "fieldRef": { 187 | "fieldPath": "metadata.name" 188 | } 189 | } 190 | }, 191 | { 192 | "name": "APP_POD_NAMESPACE", 193 | "valueFrom": { 194 | "fieldRef": { 195 | "fieldPath": "metadata.namespace" 196 | } 197 | } 198 | } 199 | ] 200 | } 201 | ] 202 | } 203 | } 204 | } 205 | } 206 | ], 207 | "parameters": [ 208 | { 209 | "name": "APPLICATION_NAME", 210 | "description": "The name for the application.", 211 | "value": "app", 212 | "required": true 213 | }, 214 | { 215 | "name": "HOSTNAME_HTTP", 216 | "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: \u003capplication-name\u003e-\u003cproject\u003e.\u003cdefault-domain-suffix\u003e" 217 | }, 218 | { 219 | "name": "CUSTOM_BASE_IMAGE", 220 | "description": "Name of the custom base image.", 221 | "value": "custom-base-image", 222 | "required": true 223 | }, 224 | { 225 | "name": "CUSTOM_BASE_IMAGE_TAG", 226 | "description": "Name of the custom base image tag.", 227 | "value": "latest", 228 | "required": true 229 | }, 230 | { 231 | "name": "IMAGE_STREAM_NAMESPACE", 232 | "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.", 233 | "value": "openshift", 234 | "required": true 235 | } 236 | ], 237 | "labels": { 238 | "template": "app" 239 | } 240 | } -------------------------------------------------------------------------------- /support/templates/create-sa.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "create-sa", 6 | "annotations": { 7 | "description": "Service Account Creation" 8 | } 9 | }, 10 | "objects": [ 11 | { 12 | "apiVersion": "v1", 13 | "kind": "ServiceAccount", 14 | "metadata": { 15 | "name": "${NAME}" 16 | } 17 | } 18 | ], 19 | "parameters": [ 20 | 21 | { 22 | "name": "NAME", 23 | "description": "Name of the Service Account", 24 | "required": true 25 | } 26 | 27 | ], 28 | "labels": { 29 | "template": "create-sa" 30 | } 31 | } -------------------------------------------------------------------------------- /support/templates/custom-base-image-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "custom-base-image", 6 | "annotations": { 7 | "description": "Application template for the Custom Base Image", 8 | "iconClass": "icon-jboss", 9 | "tags": "javaee,java,builder" 10 | } 11 | }, 12 | "objects": [ 13 | { 14 | "kind": "ImageStream", 15 | "apiVersion": "v1", 16 | "metadata": { 17 | "name": "base-centos" 18 | }, 19 | "spec": { 20 | "dockerImageRepository": "openshift/base-centos7" 21 | } 22 | }, 23 | { 24 | "kind": "ImageStream", 25 | "apiVersion": "v1", 26 | "metadata": { 27 | "name": "${APPLICATION_NAME}", 28 | "labels": { 29 | "application": "${APPLICATION_NAME}" 30 | } 31 | } 32 | }, 33 | { 34 | "kind": "BuildConfig", 35 | "apiVersion": "v1", 36 | "metadata": { 37 | "name": "${APPLICATION_NAME}", 38 | "labels": { 39 | "application": "${APPLICATION_NAME}" 40 | } 41 | }, 42 | "spec": { 43 | "source": { 44 | "type": "Binary", 45 | "binary": { 46 | "asFile": "" 47 | } 48 | }, 49 | "strategy": { 50 | "type": "Docker", 51 | "dockerStrategy": { 52 | "from": { 53 | "kind": "ImageStreamTag", 54 | "name": "base-centos:latest" 55 | } 56 | } 57 | }, 58 | "output": { 59 | "to": { 60 | "kind": "ImageStreamTag", 61 | "name": "${APPLICATION_NAME}:latest" 62 | } 63 | } 64 | } 65 | } 66 | ], 67 | "parameters": [ 68 | { 69 | "name": "APPLICATION_NAME", 70 | "description": "The name for the application.", 71 | "value": "custom-base-image", 72 | "required": true 73 | } 74 | ], 75 | "labels": { 76 | "template": "custom-base-image" 77 | } 78 | } -------------------------------------------------------------------------------- /support/templates/gogs-ephemeral-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "gogs-ephemeral", 6 | "annotations": { 7 | "description": "Gogs", 8 | "tags": "gogs" 9 | } 10 | }, 11 | "objects": [ 12 | { 13 | "kind": "ImageStream", 14 | "apiVersion": "v1", 15 | "metadata": { 16 | "name": "${APPLICATION_NAME}", 17 | "labels": { 18 | "application": "${APPLICATION_NAME}" 19 | } 20 | }, 21 | "spec": { 22 | "tags": [ 23 | { 24 | "name": "latest", 25 | "from": { 26 | "kind": "DockerImage", 27 | "name": "openshiftdemos/gogs:latest" 28 | } 29 | } 30 | ] 31 | } 32 | }, 33 | { 34 | "kind": "Service", 35 | "apiVersion": "v1", 36 | "metadata": { 37 | "name": "${APPLICATION_NAME}", 38 | "creationTimestamp": null, 39 | "labels": { 40 | "application": "${APPLICATION_NAME}" 41 | } 42 | }, 43 | "spec": { 44 | "ports": [ 45 | { 46 | "name": "gogs", 47 | "protocol": "TCP", 48 | "port": 3000, 49 | "targetPort": 3000, 50 | "nodePort": 0 51 | } 52 | ], 53 | "selector": { 54 | "name": "${APPLICATION_NAME}" 55 | }, 56 | "portalIP": "", 57 | "type": "ClusterIP", 58 | "sessionAffinity": "None" 59 | } 60 | }, 61 | { 62 | "kind": "Route", 63 | "apiVersion": "v1", 64 | "metadata": { 65 | "name": "${APPLICATION_NAME}", 66 | "creationTimestamp": null 67 | }, 68 | "spec": { 69 | "host": "${APPLICATION_HOSTNAME}", 70 | "to": { 71 | "kind": "Service", 72 | "name": "${APPLICATION_NAME}" 73 | } 74 | } 75 | }, 76 | { 77 | "kind": "DeploymentConfig", 78 | "apiVersion": "v1", 79 | "metadata": { 80 | "name": "${APPLICATION_NAME}", 81 | "creationTimestamp": null, 82 | "labels": { 83 | "application": "${APPLICATION_NAME}" 84 | } 85 | }, 86 | "spec": { 87 | "strategy": { 88 | "type": "Recreate", 89 | "resources": {} 90 | }, 91 | "triggers": [ 92 | { 93 | "type": "ImageChange", 94 | "imageChangeParams": { 95 | "automatic": true, 96 | "containerNames": [ 97 | "${APPLICATION_NAME}" 98 | ], 99 | "from": { 100 | "kind": "ImageStreamTag", 101 | "name": "${APPLICATION_NAME}:latest" 102 | }, 103 | "lastTriggeredImage": "" 104 | } 105 | }, 106 | { 107 | "type": "ConfigChange" 108 | } 109 | ], 110 | "replicas": 1, 111 | "selector": { 112 | "name": "${APPLICATION_NAME}" 113 | }, 114 | "template": { 115 | "metadata": { 116 | "creationTimestamp": null, 117 | "labels": { 118 | "name": "${APPLICATION_NAME}" 119 | } 120 | }, 121 | "spec": { 122 | "containers": [ 123 | { 124 | "name": "${APPLICATION_NAME}", 125 | "image": "${APPLICATION_NAME}", 126 | "ports": [ 127 | { 128 | "name": "gogs", 129 | "containerPort": 3000, 130 | "protocol": "TCP" 131 | } 132 | ], 133 | "readinessProbe": { 134 | "httpGet": { 135 | "port": 3000, 136 | "path": "/" 137 | }, 138 | "initialDelaySeconds": 5, 139 | "timeoutSeconds": 1, 140 | "periodSeconds": 10, 141 | "successThreshold": 1, 142 | "failureThreshold": 3 143 | }, 144 | "resources": {}, 145 | "terminationMessagePath": "/dev/termination-log", 146 | "imagePullPolicy": "Always", 147 | "capabilities": {}, 148 | "securityContext": { 149 | "capabilities": {}, 150 | "privileged": false 151 | } 152 | } 153 | ], 154 | "restartPolicy": "Always", 155 | "dnsPolicy": "ClusterFirst" 156 | } 157 | } 158 | } 159 | } 160 | ], 161 | "parameters": [ 162 | { 163 | "name": "APPLICATION_NAME", 164 | "description": "Application Name", 165 | "value": "gogs" 166 | }, 167 | { 168 | "description": "Custom hostname. Leave blank for default hostname, e.g.: ..", 169 | "name": "APPLICATION_HOSTNAME", 170 | "displayName": "Application hostname" 171 | } 172 | ], 173 | "labels": { 174 | "template": "gogs-template" 175 | } 176 | } -------------------------------------------------------------------------------- /support/templates/gogs-persistent-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "gogs-persistent", 6 | "annotations": { 7 | "description": "Gogs", 8 | "tags": "gogs" 9 | } 10 | }, 11 | "objects": [ 12 | { 13 | "kind": "ImageStream", 14 | "apiVersion": "v1", 15 | "metadata": { 16 | "name": "${APPLICATION_NAME}", 17 | "labels": { 18 | "application": "${APPLICATION_NAME}" 19 | } 20 | }, 21 | "spec": { 22 | "tags": [ 23 | { 24 | "name": "latest", 25 | "from": { 26 | "kind": "DockerImage", 27 | "name": "openshiftdemos/gogs:latest" 28 | } 29 | } 30 | ] 31 | } 32 | }, 33 | { 34 | "kind": "Service", 35 | "apiVersion": "v1", 36 | "metadata": { 37 | "name": "${APPLICATION_NAME}", 38 | "creationTimestamp": null, 39 | "labels": { 40 | "application": "${APPLICATION_NAME}" 41 | } 42 | }, 43 | "spec": { 44 | "ports": [ 45 | { 46 | "name": "gogs", 47 | "protocol": "TCP", 48 | "port": 3000, 49 | "targetPort": 3000, 50 | "nodePort": 0 51 | } 52 | ], 53 | "selector": { 54 | "name": "${APPLICATION_NAME}" 55 | }, 56 | "portalIP": "", 57 | "type": "ClusterIP", 58 | "sessionAffinity": "None" 59 | } 60 | }, 61 | { 62 | "kind": "Route", 63 | "apiVersion": "v1", 64 | "metadata": { 65 | "name": "${APPLICATION_NAME}", 66 | "creationTimestamp": null 67 | }, 68 | "spec": { 69 | "host": "${APPLICATION_HOSTNAME}", 70 | "to": { 71 | "kind": "Service", 72 | "name": "${APPLICATION_NAME}" 73 | } 74 | } 75 | }, 76 | { 77 | "kind": "PersistentVolumeClaim", 78 | "apiVersion": "v1", 79 | "metadata": { 80 | "name": "${APPLICATION_NAME}" 81 | }, 82 | "spec": { 83 | "accessModes": [ 84 | "ReadWriteOnce" 85 | ], 86 | "resources": { 87 | "requests": { 88 | "storage": "${VOLUME_CAPACITY}" 89 | } 90 | } 91 | } 92 | }, 93 | { 94 | "kind": "DeploymentConfig", 95 | "apiVersion": "v1", 96 | "metadata": { 97 | "name": "${APPLICATION_NAME}", 98 | "creationTimestamp": null, 99 | "labels": { 100 | "application": "${APPLICATION_NAME}" 101 | } 102 | }, 103 | "spec": { 104 | "strategy": { 105 | "type": "Recreate", 106 | "resources": {} 107 | }, 108 | "triggers": [ 109 | { 110 | "type": "ImageChange", 111 | "imageChangeParams": { 112 | "automatic": true, 113 | "containerNames": [ 114 | "${APPLICATION_NAME}" 115 | ], 116 | "from": { 117 | "kind": "ImageStreamTag", 118 | "name": "${APPLICATION_NAME}:latest" 119 | }, 120 | "lastTriggeredImage": "" 121 | } 122 | }, 123 | { 124 | "type": "ConfigChange" 125 | } 126 | ], 127 | "replicas": 1, 128 | "selector": { 129 | "name": "${APPLICATION_NAME}" 130 | }, 131 | "template": { 132 | "metadata": { 133 | "creationTimestamp": null, 134 | "labels": { 135 | "name": "${APPLICATION_NAME}" 136 | } 137 | }, 138 | "spec": { 139 | "containers": [ 140 | { 141 | "name": "${APPLICATION_NAME}", 142 | "image": "${APPLICATION_NAME}", 143 | "ports": [ 144 | { 145 | "name": "gogs", 146 | "containerPort": 3000, 147 | "protocol": "TCP" 148 | } 149 | ], 150 | "readinessProbe": { 151 | "httpGet": { 152 | "port": 3000, 153 | "path": "/" 154 | }, 155 | "initialDelaySeconds": 5, 156 | "timeoutSeconds": 1, 157 | "periodSeconds": 10, 158 | "successThreshold": 1, 159 | "failureThreshold": 3 160 | }, 161 | "resources": {}, 162 | "volumeMounts": [ 163 | { 164 | "name": "${APPLICATION_NAME}-data", 165 | "mountPath": "/home/gogs/gogs-repositories" 166 | } 167 | ], 168 | "terminationMessagePath": "/dev/termination-log", 169 | "imagePullPolicy": "Always", 170 | "capabilities": {}, 171 | "securityContext": { 172 | "capabilities": {}, 173 | "privileged": false 174 | } 175 | } 176 | ], 177 | "volumes": [ 178 | { 179 | "name": "${APPLICATION_NAME}-data", 180 | "persistentVolumeClaim": { 181 | "claimName": "${APPLICATION_NAME}" 182 | } 183 | } 184 | ], 185 | "restartPolicy": "Always", 186 | "dnsPolicy": "ClusterFirst" 187 | } 188 | } 189 | } 190 | } 191 | ], 192 | "parameters": [ 193 | { 194 | "name": "APPLICATION_NAME", 195 | "description": "Application Name", 196 | "value": "gogs" 197 | }, 198 | { 199 | "description": "Custom hostname. Leave blank for default hostname, e.g.: ..", 200 | "name": "APPLICATION_HOSTNAME", 201 | "displayName": "Application hostname" 202 | }, 203 | { 204 | "name": "VOLUME_CAPACITY", 205 | "description": "Volume space available for data, e.g. 512Mi, 2Gi", 206 | "value": "1Gi", 207 | "required": true 208 | } 209 | ], 210 | "labels": { 211 | "template": "gogs-template" 212 | } 213 | } -------------------------------------------------------------------------------- /support/templates/jenkins-agent-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "jenkins-agent", 6 | "annotations": { 7 | "description": "Jenkins Agent", 8 | "iconClass": "icon-jenkins", 9 | "tags": "jenkins" 10 | } 11 | }, 12 | "objects": [ 13 | { 14 | "kind": "ImageStream", 15 | "apiVersion": "v1", 16 | "metadata": { 17 | "name": "${APPLICATION_NAME}", 18 | "annotations": { 19 | "slave-directory": "/opt/jenkins-agent", 20 | "slave-label": "ose-agent" 21 | }, 22 | "labels": { 23 | "application": "${APPLICATION_NAME}", 24 | "role": "jenkins-slave" 25 | } 26 | } 27 | }, 28 | { 29 | "kind": "BuildConfig", 30 | "apiVersion": "v1", 31 | "metadata": { 32 | "name": "${APPLICATION_NAME}", 33 | "labels": { 34 | "application": "${APPLICATION_NAME}" 35 | } 36 | }, 37 | "spec": { 38 | "source": { 39 | "type": "Binary", 40 | "binary": { 41 | "asFile": "" 42 | } 43 | }, 44 | "strategy": { 45 | "type": "Docker", 46 | "dockerStrategy": { 47 | "from": { 48 | "kind": "DockerImage", 49 | "name": "centos:7" 50 | } 51 | } 52 | }, 53 | "output": { 54 | "to": { 55 | "kind": "ImageStreamTag", 56 | "name": "${APPLICATION_NAME}:latest" 57 | } 58 | } 59 | } 60 | } 61 | ], 62 | "parameters": [ 63 | { 64 | "name": "APPLICATION_NAME", 65 | "description": "Application Name", 66 | "value": "jenkins-agent" 67 | } 68 | ], 69 | "labels": { 70 | "template": "jenkins-agent" 71 | } 72 | } -------------------------------------------------------------------------------- /support/templates/jenkins-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "jenkins", 6 | "creationTimestamp": null, 7 | "annotations": { 8 | "description": "Jenkins service, with persistent storage.\nThe username is 'admin' and the tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.\nYou must have persistent volumes available in your cluster to use this template.", 9 | "iconClass": "icon-jenkins", 10 | "tags": "instant-app,jenkins" 11 | } 12 | }, 13 | "objects": [ 14 | { 15 | "kind": "ImageStream", 16 | "apiVersion": "v1", 17 | "metadata": { 18 | "name": "${APPLICATION_NAME}", 19 | "labels": { 20 | "application": "${APPLICATION_NAME}" 21 | } 22 | } 23 | }, 24 | { 25 | "kind": "Service", 26 | "apiVersion": "v1", 27 | "metadata": { 28 | "name": "${APPLICATION_NAME}", 29 | "creationTimestamp": null 30 | }, 31 | "spec": { 32 | "ports": [ 33 | { 34 | "name": "web", 35 | "protocol": "TCP", 36 | "port": 8080, 37 | "targetPort": 8080 38 | } 39 | ], 40 | "selector": { 41 | "name": "${APPLICATION_NAME}" 42 | }, 43 | "portalIP": "", 44 | "type": "ClusterIP", 45 | "sessionAffinity": "None" 46 | } 47 | }, 48 | { 49 | "kind": "Service", 50 | "apiVersion": "v1", 51 | "metadata": { 52 | "name": "${APPLICATION_NAME}-agent", 53 | "creationTimestamp": null 54 | }, 55 | "spec": { 56 | "ports": [ 57 | { 58 | "name": "agent", 59 | "protocol": "TCP", 60 | "port": 50000, 61 | "targetPort": 50000 62 | } 63 | ], 64 | "selector": { 65 | "name": "${APPLICATION_NAME}" 66 | }, 67 | "portalIP": "", 68 | "type": "ClusterIP", 69 | "sessionAffinity": "None" 70 | } 71 | }, 72 | { 73 | "kind": "Route", 74 | "apiVersion": "v1", 75 | "metadata": { 76 | "name": "jenkins" 77 | }, 78 | "spec": { 79 | "to": { 80 | "kind": "Service", 81 | "name": "${APPLICATION_NAME}" 82 | } 83 | } 84 | }, 85 | { 86 | "kind": "PersistentVolumeClaim", 87 | "apiVersion": "v1", 88 | "metadata": { 89 | "name": "${APPLICATION_NAME}" 90 | }, 91 | "spec": { 92 | "accessModes": [ 93 | "ReadWriteOnce" 94 | ], 95 | "resources": { 96 | "requests": { 97 | "storage": "${VOLUME_CAPACITY}" 98 | } 99 | } 100 | } 101 | }, 102 | { 103 | "kind": "BuildConfig", 104 | "apiVersion": "v1", 105 | "metadata": { 106 | "name": "${APPLICATION_NAME}", 107 | "labels": { 108 | "application": "${APPLICATION_NAME}" 109 | } 110 | }, 111 | "spec": { 112 | "source": { 113 | "type": "Binary", 114 | "binary": { 115 | "asFile": "" 116 | } 117 | }, 118 | "strategy": { 119 | "type": "Source", 120 | "sourceStrategy": { 121 | "from": { 122 | "kind": "ImageStreamTag", 123 | "name": "jenkins:latest", 124 | "namespace": "openshift" 125 | } 126 | } 127 | }, 128 | "output": { 129 | "to": { 130 | "kind": "ImageStreamTag", 131 | "name": "${APPLICATION_NAME}:latest" 132 | } 133 | } 134 | } 135 | }, 136 | { 137 | "kind": "DeploymentConfig", 138 | "apiVersion": "v1", 139 | "metadata": { 140 | "name": "${APPLICATION_NAME}", 141 | "creationTimestamp": null 142 | }, 143 | "spec": { 144 | "strategy": { 145 | "type": "Recreate" 146 | }, 147 | "triggers": [ 148 | { 149 | "type": "ImageChange", 150 | "imageChangeParams": { 151 | "automatic": true, 152 | "containerNames": [ 153 | "jenkins" 154 | ], 155 | "from": { 156 | "kind": "ImageStreamTag", 157 | "name": "${APPLICATION_NAME}:latest" 158 | }, 159 | "lastTriggeredImage": "" 160 | } 161 | }, 162 | { 163 | "type": "ConfigChange" 164 | } 165 | ], 166 | "replicas": 1, 167 | "selector": { 168 | "name": "${APPLICATION_NAME}" 169 | }, 170 | "template": { 171 | "metadata": { 172 | "creationTimestamp": null, 173 | "labels": { 174 | "name": "${APPLICATION_NAME}" 175 | } 176 | }, 177 | "spec": { 178 | "containers": [ 179 | { 180 | "name": "jenkins", 181 | "image": "JENKINS_IMAGE", 182 | "readinessProbe": { 183 | "timeoutSeconds": 3, 184 | "initialDelaySeconds": 3, 185 | "httpGet": { 186 | "path": "/login", 187 | "port": 8080 188 | } 189 | }, 190 | "env": [ 191 | { 192 | "name": "JENKINS_PASSWORD", 193 | "value": "${JENKINS_PASSWORD}" 194 | } 195 | ], 196 | "resources": { 197 | "limits": { 198 | "memory": "${MEMORY_LIMIT}" 199 | } 200 | }, 201 | "volumeMounts": [ 202 | { 203 | "name": "${APPLICATION_NAME}-data", 204 | "mountPath": "/var/lib/jenkins" 205 | } 206 | ], 207 | "terminationMessagePath": "/dev/termination-log", 208 | "serviceAccount": "${JENKINS_SERVICE_ACCOUNT}", 209 | "serviceAccountName": "${JENKINS_SERVICE_ACCOUNT}", 210 | "imagePullPolicy": "IfNotPresent", 211 | "capabilities": {}, 212 | "securityContext": { 213 | "capabilities": {}, 214 | "privileged": false 215 | } 216 | } 217 | ], 218 | "volumes": [ 219 | { 220 | "name": "${APPLICATION_NAME}-data", 221 | "persistentVolumeClaim": { 222 | "claimName": "${APPLICATION_NAME}" 223 | } 224 | } 225 | ], 226 | "restartPolicy": "Always", 227 | "dnsPolicy": "ClusterFirst" 228 | } 229 | } 230 | } 231 | } 232 | ], 233 | "parameters": [ 234 | { 235 | "name": "MEMORY_LIMIT", 236 | "displayName": "Memory Limit", 237 | "description": "Maximum amount of memory the container can use.", 238 | "value": "1Gi" 239 | }, 240 | { 241 | "name": "NAMESPACE", 242 | "displayName": "Namespace", 243 | "description": "The OpenShift Namespace where the ImageStream resides.", 244 | "value": "openshift" 245 | }, 246 | { 247 | "name": "APPLICATION_NAME", 248 | "displayName": "Application Name", 249 | "description": "Application Name.", 250 | "value": "jenkins" 251 | }, 252 | { 253 | "name": "JENKINS_PASSWORD", 254 | "displayName": "Jenkins Password", 255 | "description": "Password for the Jenkins 'admin' user.", 256 | "value": "password", 257 | "generate": "expression" 258 | }, 259 | { 260 | "name": "JENKINS_SERVICE_ACCOUNT", 261 | "description": "OpenShift Service account for Jenkins", 262 | "value": "default" 263 | }, 264 | { 265 | "name": "VOLUME_CAPACITY", 266 | "displayName": "Volume Capacity", 267 | "description": "Volume space available for data, e.g. 512Mi, 2Gi.", 268 | "value": "1Gi", 269 | "required": true 270 | } 271 | ], 272 | "labels": { 273 | "template": "jenkins-template" 274 | } 275 | } 276 | -------------------------------------------------------------------------------- /support/templates/nexus-ephemeral-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "nexus-persistent", 6 | "annotations": { 7 | "description": "Jenkins", 8 | "iconClass": "java", 9 | "tags": "nexus" 10 | } 11 | }, 12 | "objects": [ 13 | { 14 | "kind": "ImageStream", 15 | "apiVersion": "v1", 16 | "metadata": { 17 | "name": "${APPLICATION_NAME}", 18 | "labels": { 19 | "application": "${APPLICATION_NAME}" 20 | } 21 | } 22 | }, 23 | { 24 | "kind": "Service", 25 | "apiVersion": "v1", 26 | "metadata": { 27 | "name": "${APPLICATION_NAME}", 28 | "creationTimestamp": null, 29 | "labels": { 30 | "application": "${APPLICATION_NAME}" 31 | } 32 | }, 33 | "spec": { 34 | "ports": [ 35 | { 36 | "name": "web", 37 | "protocol": "TCP", 38 | "port": 8081, 39 | "targetPort": 8081, 40 | "nodePort": 0 41 | } 42 | ], 43 | "selector": { 44 | "name": "${APPLICATION_NAME}" 45 | }, 46 | "portalIP": "", 47 | "type": "ClusterIP", 48 | "sessionAffinity": "None" 49 | } 50 | }, 51 | { 52 | "kind": "BuildConfig", 53 | "apiVersion": "v1", 54 | "metadata": { 55 | "name": "${APPLICATION_NAME}", 56 | "labels": { 57 | "application": "${APPLICATION_NAME}" 58 | } 59 | }, 60 | "spec": { 61 | "source": { 62 | "type": "Binary", 63 | "binary": { 64 | "asFile": "" 65 | } 66 | }, 67 | "strategy": { 68 | "type": "Docker", 69 | "dockerStrategy": { 70 | "from": { 71 | "kind": "ImageStreamTag", 72 | "name": "rhel7:latest" 73 | } 74 | } 75 | }, 76 | "output": { 77 | "to": { 78 | "kind": "ImageStreamTag", 79 | "name": "${APPLICATION_NAME}:latest" 80 | } 81 | } 82 | } 83 | }, 84 | { 85 | "kind": "Route", 86 | "apiVersion": "v1", 87 | "metadata": { 88 | "name": "${APPLICATION_NAME}", 89 | "creationTimestamp": null 90 | }, 91 | "spec": { 92 | "host": "${APPLICATION_HOSTNAME}", 93 | "to": { 94 | "kind": "Service", 95 | "name": "${APPLICATION_NAME}" 96 | } 97 | } 98 | }, 99 | { 100 | "kind": "DeploymentConfig", 101 | "apiVersion": "v1", 102 | "metadata": { 103 | "name": "${APPLICATION_NAME}", 104 | "creationTimestamp": null, 105 | "labels": { 106 | "application": "${APPLICATION_NAME}" 107 | } 108 | }, 109 | "spec": { 110 | "strategy": { 111 | "type": "Recreate", 112 | "resources": {} 113 | }, 114 | "triggers": [ 115 | { 116 | "type": "ImageChange", 117 | "imageChangeParams": { 118 | "automatic": true, 119 | "containerNames": [ 120 | "${APPLICATION_NAME}" 121 | ], 122 | "from": { 123 | "kind": "ImageStreamTag", 124 | "name": "${APPLICATION_NAME}:latest" 125 | }, 126 | "lastTriggeredImage": "" 127 | } 128 | }, 129 | { 130 | "type": "ConfigChange" 131 | } 132 | ], 133 | "replicas": 1, 134 | "selector": { 135 | "name": "${APPLICATION_NAME}" 136 | }, 137 | "template": { 138 | "metadata": { 139 | "creationTimestamp": null, 140 | "labels": { 141 | "name": "${APPLICATION_NAME}" 142 | } 143 | }, 144 | "spec": { 145 | "containers": [ 146 | { 147 | "name": "${APPLICATION_NAME}", 148 | "image": "${APPLICATION_NAME}", 149 | "ports": [ 150 | { 151 | "name": "web", 152 | "containerPort": 8081, 153 | "protocol": "TCP" 154 | } 155 | ], 156 | "resources": {}, 157 | "volumeMounts": [ 158 | { 159 | "name": "${APPLICATION_NAME}-data", 160 | "mountPath": "/sonatype-work" 161 | } 162 | ], 163 | "terminationMessagePath": "/dev/termination-log", 164 | "imagePullPolicy": "Always", 165 | "capabilities": {}, 166 | "securityContext": { 167 | "capabilities": {}, 168 | "privileged": false 169 | } 170 | } 171 | ], 172 | "volumes": [ 173 | { 174 | "name": "${APPLICATION_NAME}-data", 175 | "emptyDir": { 176 | "medium": "" 177 | } 178 | } 179 | ], 180 | "restartPolicy": "Always", 181 | "dnsPolicy": "ClusterFirst" 182 | } 183 | } 184 | } 185 | } 186 | ], 187 | "parameters": [ 188 | { 189 | "name": "APPLICATION_NAME", 190 | "description": "Application Name", 191 | "value": "nexus" 192 | }, 193 | { 194 | "description": "Custom hostname. Leave blank for default hostname, e.g.: ..", 195 | "name": "APPLICATION_HOSTNAME", 196 | "displayName": "Application hostname" 197 | } 198 | ], 199 | "labels": { 200 | "template": "nexus-persistent" 201 | } 202 | } -------------------------------------------------------------------------------- /support/templates/nexus-persistent-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "nexus-persistent", 6 | "annotations": { 7 | "description": "Jenkins", 8 | "iconClass": "java", 9 | "tags": "nexus" 10 | } 11 | }, 12 | "objects": [ 13 | { 14 | "kind": "ImageStream", 15 | "apiVersion": "v1", 16 | "metadata": { 17 | "name": "${APPLICATION_NAME}", 18 | "labels": { 19 | "application": "${APPLICATION_NAME}" 20 | } 21 | } 22 | }, 23 | { 24 | "kind": "Service", 25 | "apiVersion": "v1", 26 | "metadata": { 27 | "name": "${APPLICATION_NAME}", 28 | "creationTimestamp": null, 29 | "labels": { 30 | "application": "${APPLICATION_NAME}" 31 | } 32 | }, 33 | "spec": { 34 | "ports": [ 35 | { 36 | "name": "web", 37 | "protocol": "TCP", 38 | "port": 8081, 39 | "targetPort": 8081, 40 | "nodePort": 0 41 | } 42 | ], 43 | "selector": { 44 | "name": "${APPLICATION_NAME}" 45 | }, 46 | "portalIP": "", 47 | "type": "ClusterIP", 48 | "sessionAffinity": "None" 49 | } 50 | }, 51 | { 52 | "kind": "BuildConfig", 53 | "apiVersion": "v1", 54 | "metadata": { 55 | "name": "${APPLICATION_NAME}", 56 | "labels": { 57 | "application": "${APPLICATION_NAME}" 58 | } 59 | }, 60 | "spec": { 61 | "source": { 62 | "type": "Binary", 63 | "binary": { 64 | "asFile": "" 65 | } 66 | }, 67 | "strategy": { 68 | "type": "Docker", 69 | "dockerStrategy": { 70 | "from": { 71 | "kind": "ImageStreamTag", 72 | "name": "rhel7:latest" 73 | } 74 | } 75 | }, 76 | "output": { 77 | "to": { 78 | "kind": "ImageStreamTag", 79 | "name": "${APPLICATION_NAME}:latest" 80 | } 81 | }, 82 | "triggers": [ 83 | { 84 | "type": "ConfigChange" 85 | }, 86 | { 87 | "type": "ImageChange", 88 | "imageChange": {} 89 | } 90 | ] 91 | } 92 | }, 93 | { 94 | "kind": "Route", 95 | "apiVersion": "v1", 96 | "metadata": { 97 | "name": "${APPLICATION_NAME}", 98 | "creationTimestamp": null 99 | }, 100 | "spec": { 101 | "host": "${APPLICATION_HOSTNAME}", 102 | "to": { 103 | "kind": "Service", 104 | "name": "${APPLICATION_NAME}" 105 | } 106 | } 107 | }, 108 | { 109 | "kind": "PersistentVolumeClaim", 110 | "apiVersion": "v1", 111 | "metadata": { 112 | "name": "${APPLICATION_NAME}" 113 | }, 114 | "spec": { 115 | "accessModes": [ 116 | "ReadWriteOnce" 117 | ], 118 | "resources": { 119 | "requests": { 120 | "storage": "${VOLUME_CAPACITY}" 121 | } 122 | } 123 | } 124 | }, 125 | { 126 | "kind": "DeploymentConfig", 127 | "apiVersion": "v1", 128 | "metadata": { 129 | "name": "${APPLICATION_NAME}", 130 | "creationTimestamp": null, 131 | "labels": { 132 | "application": "${APPLICATION_NAME}" 133 | } 134 | }, 135 | "spec": { 136 | "strategy": { 137 | "type": "Recreate", 138 | "resources": {} 139 | }, 140 | "triggers": [ 141 | { 142 | "type": "ImageChange", 143 | "imageChangeParams": { 144 | "automatic": true, 145 | "containerNames": [ 146 | "${APPLICATION_NAME}" 147 | ], 148 | "from": { 149 | "kind": "ImageStreamTag", 150 | "name": "${APPLICATION_NAME}:latest" 151 | }, 152 | "lastTriggeredImage": "" 153 | } 154 | }, 155 | { 156 | "type": "ConfigChange" 157 | } 158 | ], 159 | "replicas": 1, 160 | "selector": { 161 | "name": "${APPLICATION_NAME}" 162 | }, 163 | "template": { 164 | "metadata": { 165 | "creationTimestamp": null, 166 | "labels": { 167 | "name": "${APPLICATION_NAME}" 168 | } 169 | }, 170 | "spec": { 171 | "containers": [ 172 | { 173 | "name": "${APPLICATION_NAME}", 174 | "image": "${APPLICATION_NAME}", 175 | "ports": [ 176 | { 177 | "name": "web", 178 | "containerPort": 8081, 179 | "protocol": "TCP" 180 | } 181 | ], 182 | "resources": {}, 183 | "volumeMounts": [ 184 | { 185 | "name": "${APPLICATION_NAME}-data", 186 | "mountPath": "/sonatype-work" 187 | } 188 | ], 189 | "terminationMessagePath": "/dev/termination-log", 190 | "imagePullPolicy": "Always", 191 | "capabilities": {}, 192 | "securityContext": { 193 | "capabilities": {}, 194 | "privileged": false 195 | } 196 | } 197 | ], 198 | "volumes": [ 199 | { 200 | "name": "${APPLICATION_NAME}-data", 201 | "persistentVolumeClaim": { 202 | "claimName": "${APPLICATION_NAME}" 203 | } 204 | } 205 | ], 206 | "restartPolicy": "Always", 207 | "dnsPolicy": "ClusterFirst" 208 | } 209 | } 210 | } 211 | } 212 | ], 213 | "parameters": [ 214 | { 215 | "name": "APPLICATION_NAME", 216 | "description": "Application Name", 217 | "value": "nexus" 218 | }, 219 | { 220 | "description": "Custom hostname. Leave blank for default hostname, e.g.: ..", 221 | "name": "APPLICATION_HOSTNAME", 222 | "displayName": "Application hostname" 223 | }, 224 | { 225 | "name": "VOLUME_CAPACITY", 226 | "description": "Volume space available for data, e.g. 512Mi, 2Gi", 227 | "value": "1Gi", 228 | "required": true 229 | } 230 | ], 231 | "labels": { 232 | "template": "nexus-persistent" 233 | } 234 | } -------------------------------------------------------------------------------- /support/templates/postgresql-ephemeral.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "postgresql-ephemeral", 6 | "creationTimestamp": null, 7 | "annotations": { 8 | "description": "PostgreSQL database service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", 9 | "iconClass": "icon-postgresql", 10 | "tags": "database,postgresql" 11 | } 12 | }, 13 | "objects": [ 14 | { 15 | "kind": "Service", 16 | "apiVersion": "v1", 17 | "metadata": { 18 | "name": "${DATABASE_SERVICE_NAME}", 19 | "creationTimestamp": null 20 | }, 21 | "spec": { 22 | "ports": [ 23 | { 24 | "name": "postgresql", 25 | "protocol": "TCP", 26 | "port": 5432, 27 | "targetPort": 5432, 28 | "nodePort": 0 29 | } 30 | ], 31 | "selector": { 32 | "name": "${DATABASE_SERVICE_NAME}" 33 | }, 34 | "portalIP": "", 35 | "type": "ClusterIP", 36 | "sessionAffinity": "None" 37 | }, 38 | "status": { 39 | "loadBalancer": {} 40 | } 41 | }, 42 | { 43 | "kind": "DeploymentConfig", 44 | "apiVersion": "v1", 45 | "metadata": { 46 | "name": "${DATABASE_SERVICE_NAME}", 47 | "creationTimestamp": null 48 | }, 49 | "spec": { 50 | "strategy": { 51 | "type": "Recreate" 52 | }, 53 | "triggers": [ 54 | { 55 | "type": "ImageChange", 56 | "imageChangeParams": { 57 | "automatic": true, 58 | "containerNames": [ 59 | "postgresql" 60 | ], 61 | "from": { 62 | "kind": "ImageStreamTag", 63 | "name": "postgresql:latest", 64 | "namespace": "${NAMESPACE}" 65 | }, 66 | "lastTriggeredImage": "" 67 | } 68 | }, 69 | { 70 | "type": "ConfigChange" 71 | } 72 | ], 73 | "replicas": 1, 74 | "selector": { 75 | "name": "${DATABASE_SERVICE_NAME}" 76 | }, 77 | "template": { 78 | "metadata": { 79 | "creationTimestamp": null, 80 | "labels": { 81 | "name": "${DATABASE_SERVICE_NAME}" 82 | } 83 | }, 84 | "spec": { 85 | "containers": [ 86 | { 87 | "name": "postgresql", 88 | "image": "postgresql", 89 | "ports": [ 90 | { 91 | "containerPort": 5432, 92 | "protocol": "TCP" 93 | } 94 | ], 95 | "readinessProbe": { 96 | "timeoutSeconds": 1, 97 | "initialDelaySeconds": 5, 98 | "exec": { 99 | "command": [ 100 | "/bin/sh", 101 | "-i", 102 | "-c", 103 | "psql -h 127.0.0.1 -U $POSTGRESQL_USER -q -d $POSTGRESQL_DATABASE -c 'SELECT 1'" 104 | ] 105 | } 106 | }, 107 | "livenessProbe": { 108 | "timeoutSeconds": 1, 109 | "initialDelaySeconds": 30, 110 | "tcpSocket": { 111 | "port": 5432 112 | } 113 | }, 114 | "env": [ 115 | { 116 | "name": "POSTGRESQL_USER", 117 | "value": "${POSTGRESQL_USER}" 118 | }, 119 | { 120 | "name": "POSTGRESQL_PASSWORD", 121 | "value": "${POSTGRESQL_PASSWORD}" 122 | }, 123 | { 124 | "name": "POSTGRESQL_DATABASE", 125 | "value": "${POSTGRESQL_DATABASE}" 126 | } 127 | ], 128 | "resources": { 129 | "limits": { 130 | "memory": "${MEMORY_LIMIT}" 131 | } 132 | }, 133 | "volumeMounts": [ 134 | { 135 | "name": "${DATABASE_SERVICE_NAME}-data", 136 | "mountPath": "/var/lib/pgsql/data" 137 | } 138 | ], 139 | "terminationMessagePath": "/dev/termination-log", 140 | "imagePullPolicy": "IfNotPresent", 141 | "capabilities": {}, 142 | "securityContext": { 143 | "capabilities": {}, 144 | "privileged": false 145 | } 146 | } 147 | ], 148 | "volumes": [ 149 | { 150 | "name": "${DATABASE_SERVICE_NAME}-data", 151 | "emptyDir": { 152 | "medium": "" 153 | } 154 | } 155 | ], 156 | "restartPolicy": "Always", 157 | "dnsPolicy": "ClusterFirst" 158 | } 159 | } 160 | }, 161 | "status": {} 162 | } 163 | ], 164 | "parameters": [ 165 | { 166 | "name": "MEMORY_LIMIT", 167 | "displayName": "Memory Limit", 168 | "description": "Maximum amount of memory the container can use.", 169 | "value": "512Mi" 170 | }, 171 | { 172 | "name": "NAMESPACE", 173 | "displayName": "Namespace", 174 | "description": "The OpenShift Namespace where the ImageStream resides.", 175 | "value": "openshift" 176 | }, 177 | { 178 | "name": "DATABASE_SERVICE_NAME", 179 | "displayName": "Database Service Name", 180 | "description": "The name of the OpenShift Service exposed for the database.", 181 | "value": "postgresql", 182 | "required": true 183 | }, 184 | { 185 | "name": "POSTGRESQL_USER", 186 | "displayName": "PostgreSQL User", 187 | "description": "Username for PostgreSQL user that will be used for accessing the database.", 188 | "generate": "expression", 189 | "from": "user[A-Z0-9]{3}", 190 | "required": true 191 | }, 192 | { 193 | "name": "POSTGRESQL_PASSWORD", 194 | "displayName": "PostgreSQL Password", 195 | "description": "Password for the PostgreSQL user.", 196 | "generate": "expression", 197 | "from": "[a-zA-Z0-9]{16}", 198 | "required": true 199 | }, 200 | { 201 | "name": "POSTGRESQL_DATABASE", 202 | "displayName": "PostgreSQL Database Name", 203 | "description": "Name of the PostgreSQL database accessed.", 204 | "value": "sampledb", 205 | "required": true 206 | } 207 | ], 208 | "labels": { 209 | "template": "postgresql-ephemeral-template" 210 | } 211 | } 212 | -------------------------------------------------------------------------------- /support/templates/postgresql-persistent.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "postgresql-persistent", 6 | "creationTimestamp": null, 7 | "annotations": { 8 | "description": "PostgreSQL database service, with persistent storage. Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", 9 | "iconClass": "icon-postgresql", 10 | "tags": "database,postgresql" 11 | } 12 | }, 13 | "objects": [ 14 | { 15 | "kind": "Service", 16 | "apiVersion": "v1", 17 | "metadata": { 18 | "name": "${DATABASE_SERVICE_NAME}", 19 | "creationTimestamp": null 20 | }, 21 | "spec": { 22 | "ports": [ 23 | { 24 | "name": "postgresql", 25 | "protocol": "TCP", 26 | "port": 5432, 27 | "targetPort": 5432, 28 | "nodePort": 0 29 | } 30 | ], 31 | "selector": { 32 | "name": "${DATABASE_SERVICE_NAME}" 33 | }, 34 | "portalIP": "", 35 | "type": "ClusterIP", 36 | "sessionAffinity": "None" 37 | }, 38 | "status": { 39 | "loadBalancer": {} 40 | } 41 | }, 42 | { 43 | "kind": "PersistentVolumeClaim", 44 | "apiVersion": "v1", 45 | "metadata": { 46 | "name": "${DATABASE_SERVICE_NAME}" 47 | }, 48 | "spec": { 49 | "accessModes": [ 50 | "ReadWriteOnce" 51 | ], 52 | "resources": { 53 | "requests": { 54 | "storage": "${VOLUME_CAPACITY}" 55 | } 56 | } 57 | } 58 | }, 59 | { 60 | "kind": "DeploymentConfig", 61 | "apiVersion": "v1", 62 | "metadata": { 63 | "name": "${DATABASE_SERVICE_NAME}", 64 | "creationTimestamp": null 65 | }, 66 | "spec": { 67 | "strategy": { 68 | "type": "Recreate" 69 | }, 70 | "triggers": [ 71 | { 72 | "type": "ImageChange", 73 | "imageChangeParams": { 74 | "automatic": true, 75 | "containerNames": [ 76 | "postgresql" 77 | ], 78 | "from": { 79 | "kind": "ImageStreamTag", 80 | "name": "postgresql:latest", 81 | "namespace": "${NAMESPACE}" 82 | }, 83 | "lastTriggeredImage": "" 84 | } 85 | }, 86 | { 87 | "type": "ConfigChange" 88 | } 89 | ], 90 | "replicas": 1, 91 | "selector": { 92 | "name": "${DATABASE_SERVICE_NAME}" 93 | }, 94 | "template": { 95 | "metadata": { 96 | "creationTimestamp": null, 97 | "labels": { 98 | "name": "${DATABASE_SERVICE_NAME}" 99 | } 100 | }, 101 | "spec": { 102 | "containers": [ 103 | { 104 | "name": "postgresql", 105 | "image": "postgresql", 106 | "ports": [ 107 | { 108 | "containerPort": 5432, 109 | "protocol": "TCP" 110 | } 111 | ], 112 | "readinessProbe": { 113 | "timeoutSeconds": 1, 114 | "initialDelaySeconds": 5, 115 | "exec": { 116 | "command": [ 117 | "/bin/sh", 118 | "-i", 119 | "-c", 120 | "psql -h 127.0.0.1 -U $POSTGRESQL_USER -q -d $POSTGRESQL_DATABASE -c 'SELECT 1'" 121 | ] 122 | } 123 | }, 124 | "livenessProbe": { 125 | "timeoutSeconds": 1, 126 | "initialDelaySeconds": 30, 127 | "tcpSocket": { 128 | "port": 5432 129 | } 130 | }, 131 | "env": [ 132 | { 133 | "name": "POSTGRESQL_USER", 134 | "value": "${POSTGRESQL_USER}" 135 | }, 136 | { 137 | "name": "POSTGRESQL_PASSWORD", 138 | "value": "${POSTGRESQL_PASSWORD}" 139 | }, 140 | { 141 | "name": "POSTGRESQL_DATABASE", 142 | "value": "${POSTGRESQL_DATABASE}" 143 | } 144 | ], 145 | "resources": { 146 | "limits": { 147 | "memory": "${MEMORY_LIMIT}" 148 | } 149 | }, 150 | "volumeMounts": [ 151 | { 152 | "name": "${DATABASE_SERVICE_NAME}-data", 153 | "mountPath": "/var/lib/pgsql/data" 154 | } 155 | ], 156 | "terminationMessagePath": "/dev/termination-log", 157 | "imagePullPolicy": "IfNotPresent", 158 | "capabilities": {}, 159 | "securityContext": { 160 | "capabilities": {}, 161 | "privileged": false 162 | } 163 | } 164 | ], 165 | "volumes": [ 166 | { 167 | "name": "${DATABASE_SERVICE_NAME}-data", 168 | "persistentVolumeClaim": { 169 | "claimName": "${DATABASE_SERVICE_NAME}" 170 | } 171 | } 172 | ], 173 | "restartPolicy": "Always", 174 | "dnsPolicy": "ClusterFirst" 175 | } 176 | } 177 | }, 178 | "status": {} 179 | } 180 | ], 181 | "parameters": [ 182 | { 183 | "name": "MEMORY_LIMIT", 184 | "displayName": "Memory Limit", 185 | "description": "Maximum amount of memory the container can use.", 186 | "value": "512Mi" 187 | }, 188 | { 189 | "name": "NAMESPACE", 190 | "displayName": "Namespace", 191 | "description": "The OpenShift Namespace where the ImageStream resides.", 192 | "value": "openshift" 193 | }, 194 | { 195 | "name": "DATABASE_SERVICE_NAME", 196 | "displayName": "Database Service Name", 197 | "description": "The name of the OpenShift Service exposed for the database.", 198 | "value": "postgresql", 199 | "required": true 200 | }, 201 | { 202 | "name": "POSTGRESQL_USER", 203 | "displayName": "PostgreSQL User", 204 | "description": "Username for PostgreSQL user that will be used for accessing the database.", 205 | "generate": "expression", 206 | "from": "user[A-Z0-9]{3}", 207 | "required": true 208 | }, 209 | { 210 | "name": "POSTGRESQL_PASSWORD", 211 | "displayName": "PostgreSQL Password", 212 | "description": "Password for the PostgreSQL user.", 213 | "generate": "expression", 214 | "from": "[a-zA-Z0-9]{16}", 215 | "required": true 216 | }, 217 | { 218 | "name": "POSTGRESQL_DATABASE", 219 | "displayName": "PostgreSQL Database Name", 220 | "description": "Name of the PostgreSQL database accessed.", 221 | "value": "sampledb", 222 | "required": true 223 | }, 224 | { 225 | "name": "VOLUME_CAPACITY", 226 | "displayName": "Volume Capacity", 227 | "description": "Volume space available for data, e.g. 512Mi, 2Gi.", 228 | "value": "1Gi", 229 | "required": true 230 | } 231 | ], 232 | "labels": { 233 | "template": "postgresql-persistent-template" 234 | } 235 | } 236 | -------------------------------------------------------------------------------- /support/templates/rhel7-is.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "ImageStream", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "rhel7" 6 | }, 7 | "spec": { 8 | "dockerImageRepository": "registry.access.redhat.com/rhel7/rhel" 9 | } 10 | } -------------------------------------------------------------------------------- /support/templates/shared-resource-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "shared-resource-template", 6 | "annotations": { 7 | "description": "Template for creating permissions to share resources in a project" 8 | } 9 | }, 10 | "objects": [ 11 | { 12 | "kind": "Role", 13 | "apiVersion": "v1", 14 | "metadata": { 15 | "name": "${ROLE_NAME}", 16 | "creationTimestamp": null 17 | }, 18 | "rules": [ 19 | { 20 | "verbs": [ 21 | "get", 22 | "list" 23 | ], 24 | "attributeRestrictions": null, 25 | "apiGroups": null, 26 | "resources": [ 27 | "imagestreamimages", 28 | "imagestreamimports", 29 | "imagestreammappings", 30 | "imagestreams", 31 | "imagestreamtags", 32 | "templates" 33 | ] 34 | }, 35 | { 36 | "verbs": [ 37 | "get" 38 | ], 39 | "attributeRestrictions": null, 40 | "apiGroups": null, 41 | "resources": [ 42 | "imagestreams/layers" 43 | ] 44 | } 45 | ] 46 | }, 47 | { 48 | "kind": "PolicyBinding", 49 | "apiVersion": "v1", 50 | "metadata": { 51 | "name": "openshift:default", 52 | "creationTimestamp": null 53 | }, 54 | "policyRef": { 55 | "namespace": "${NAMESPACE}", 56 | "name": "default" 57 | }, 58 | "roleBindings": [ 59 | { 60 | "name": "shared-resource-viewers", 61 | "roleBinding": { 62 | "metadata": { 63 | "name": "${ROLE_BINDING_NAME}", 64 | "namespace": "${NAMESPACE}" 65 | }, 66 | "userNames": null, 67 | "groupNames": [ 68 | "system:authenticated" 69 | ], 70 | "subjects": [ 71 | { 72 | "kind": "SystemGroup", 73 | "name": "system:authenticated" 74 | } 75 | ], 76 | "roleRef": { 77 | "namespace": "${NAMESPACE}", 78 | "name": "${ROLE_NAME}" 79 | } 80 | } 81 | } 82 | ] 83 | } 84 | ], 85 | "parameters": [ 86 | { 87 | "name": "NAMESPACE", 88 | "description": "Name of the common project contanining enterprise resources", 89 | "value": "enterprise-resources" 90 | }, 91 | { 92 | "name": "ROLE_NAME", 93 | "description": "Name of the role", 94 | "value": "shared-resource-viewer" 95 | }, 96 | { 97 | "name": "ROLE_BINDING_NAME", 98 | "description": "Name of the role binding", 99 | "value": "shared-resource-viewers" 100 | } 101 | ], 102 | "labels": { 103 | "template": "shared-resources-template" 104 | } 105 | } --------------------------------------------------------------------------------