forked from RedHatTraining/DO288-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit with apps from course repo
- Loading branch information
0 parents
commit 497620c
Showing
244 changed files
with
6,997 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM registry.access.redhat.com/rhel7:7.6 | ||
|
||
RUN rpm --rebuilddb && \ | ||
yum install -y httpd \ | ||
&& yum clean all | ||
|
||
ADD index.html /var/www/html | ||
|
||
RUN sed -i 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf \ | ||
&& chgrp -R 0 /var/log/httpd /var/run/httpd \ | ||
&& chmod -R g=u /var/log/httpd /var/run/httpd | ||
|
||
EXPOSE 8080 | ||
|
||
USER 1001 | ||
|
||
ENTRYPOINT ["httpd"] | ||
CMD ["-D", "FOREGROUND"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
<h1>Hello, World!</h1> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[rhel-7-dvd] | ||
baseurl = http://content.example.com/rhel7.6/x86_64/dvd | ||
enabled = true | ||
gpgcheck = false | ||
name = Remote classroom copy of RHEL DVD | ||
|
||
[rhel-server-rhscl-7-rpms] | ||
baseurl = http://content.example.com/ocp4.0/x86_64/rhelrhscl | ||
enabled = true | ||
gpgcheck = false | ||
name = Remote classroom copy of RHSCL | ||
|
||
[rhel-7-server-datapath-rpms] | ||
baseurl = http://content.example.com/ocp4.0/x86_64/rheladditional/rhel-7-fast-datapath-rpms | ||
enabled = true | ||
gpgcheck = false | ||
name = Remote classroom copy of RHEL 7.6 Datapath Packages | ||
|
||
[rhel-7-server-ansible-26] | ||
baseurl = http://content.example.com/ocp4.0/x86_64/rheladditional/rhel-7-server-ansible-2.6-rpms | ||
enabled = true | ||
gpgcheck = false | ||
name = Remote classroom copy of RHEL 7.6 Ansible Packages | ||
|
||
[rhel-7-server-extras-rpms] | ||
baseurl = http://content.example.com/ocp4.0/x86_64/rheladditional/rhel-7-server-extras-rpms | ||
enabled = true | ||
gpgcheck = false | ||
name = Remote classroom copy of RHEL 7.6 Extra Packages | ||
|
||
[rhel-7-server-common-rpms] | ||
baseurl = http://content.example.com/ocp4.0/x86_64/rheladditional/rhel-7-server-rh-common-rpms | ||
enabled = true | ||
gpgcheck = false | ||
name = Remote classroom copy of RHEL 7.6 Common Packages | ||
|
||
[rhel-7-server-supplementary] | ||
baseurl = http://content.example.com/ocp4.0/x86_64/rhelsupplementary | ||
enabled = true | ||
gpgcheck = false | ||
name = Remote classroom copy of RHEL 7.6 Supplementary Packages | ||
|
||
[rhel-7-server-optional-rpms] | ||
baseurl = http://content.example.com/ocp4.0/x86_64/rhelopt | ||
enabled = true | ||
gpgcheck = false | ||
name = Remote classroom copy of RHEL 7.6 Optional Packages | ||
|
||
[rhel-7-server-updates] | ||
baseurl = http://content.example.com/ocp4.0/x86_64/rhelupdates | ||
enabled = true | ||
gpgcheck = false | ||
name = Remote classroom copy of RHEL 7.6 Updates | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
var express = require('express'); | ||
var fs = require('fs') | ||
app = express(); | ||
|
||
// read in the APP_MSG env var | ||
var msg = process.env.APP_MSG; | ||
|
||
var response; | ||
|
||
app.get('/', function (req, res) { | ||
|
||
response = 'Value in the APP_MSG env var is => ' + msg + '\n'; | ||
|
||
// Read in the secret file | ||
fs.readFile('/opt/app-root/secure/myapp.sec', 'utf8', function (secerr,secdata) { | ||
if (secerr) { | ||
console.log(secerr + '\n'); | ||
response += secerr + '\n'; | ||
} | ||
else { | ||
response += 'The secret is => ' + secdata + '\n'; | ||
} | ||
|
||
//send the response to the client | ||
res.send(response); | ||
}); | ||
|
||
}); | ||
|
||
app.listen(8080, function () { | ||
console.log('Server listening on port 8080...'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
username=user1 | ||
password=pass1 | ||
salt=xyz123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "node-configmap", | ||
"version": "1.0.0", | ||
"description": "A simple Node.js app to demonstrate config maps and secrets", | ||
"main": "app.js", | ||
"scripts": { | ||
"start": "node app.js" | ||
}, | ||
"author": "Red Hat Training", | ||
"license": "ASL", | ||
"dependencies": { | ||
"express": "4.14.x" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var express = require('express'); | ||
app = express(); | ||
|
||
app.get('/', function (req, res) { | ||
res.send('Simple app for the Building Applications Lab!\n'); | ||
}); | ||
|
||
app.listen(8080, function () { | ||
console.log('Simple app for the Building Applications Lab!'); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "nodejs-helloworld", | ||
"version": "1.0.0", | ||
"description": "Hello World!", | ||
"main": "app.js", | ||
"scripts": { | ||
"start": "node app.js" | ||
}, | ||
"author": "Red Hat Training", | ||
"license": "ASL", | ||
"dependencies": { | ||
"express": "4.14.x" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM registry.centos.org/centos/centos:centos7 | ||
|
||
MAINTAINER Red Hat Training <[email protected]> | ||
|
||
# command line options to pass to the JVM | ||
ENV JAVA_OPTIONS -Xmx512m | ||
|
||
# Install the Java runtime, create a user for running the app, and set permissions | ||
RUN rpm --rebuilddb && \ | ||
yum install -y --noplugins java-1.8.0-openjdk-headless && \ | ||
yum clean all --noplugins -y && \ | ||
mkdir -p /opt/app-root/bin | ||
|
||
# Copy the runnable fat JAR to the container. | ||
ADD app-src/target/builds-for-managers-swarm.jar /opt/app-root/bin/builds-for-managers.jar | ||
|
||
COPY run-app.sh /opt/app-root/bin/ | ||
|
||
RUN chgrp -R 0 /opt/app-root && \ | ||
chmod -R g=u /opt/app-root | ||
|
||
EXPOSE 8080 | ||
|
||
USER 1001 | ||
|
||
# Run the fat JAR | ||
CMD /opt/app-root/bin/run-app.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" path="target/generated-sources/annotations"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="ignore_optional_problems" value="true"/> | ||
<attribute name="m2e-apt" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="ignore_optional_problems" value="true"/> | ||
<attribute name="m2e-apt" value="true"/> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>builds-for-managers</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.m2e.core.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
2 changes: 2 additions & 0 deletions
2
builds-for-managers/app-src/.settings/org.eclipse.core.resources.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 |
2 changes: 2 additions & 0 deletions
2
builds-for-managers/app-src/.settings/org.eclipse.jdt.apt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.apt.aptEnabled=false |
9 changes: 9 additions & 0 deletions
9
builds-for-managers/app-src/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore | ||
org.eclipse.jdt.core.compiler.processAnnotations=disabled | ||
org.eclipse.jdt.core.compiler.release=disabled | ||
org.eclipse.jdt.core.compiler.source=1.8 |
4 changes: 4 additions & 0 deletions
4
builds-for-managers/app-src/.settings/org.eclipse.m2e.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
resolveWorkspaceProjects=true | ||
version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.redhat.training.example</groupId> | ||
<artifactId>builds-for-managers</artifactId> | ||
<name>WildFly Swarm Example</name> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>war</packaging> | ||
|
||
<properties> | ||
<version.wildfly.swarm>2017.10.0</version.wildfly.swarm> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
<failOnMissingWebXml>false</failOnMissingWebXml> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.wildfly.swarm</groupId> | ||
<artifactId>bom-all</artifactId> | ||
<version>${version.wildfly.swarm}</version> | ||
<scope>import</scope> | ||
<type>pom</type> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<build> | ||
<finalName>builds-for-managers</finalName> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.wildfly.swarm</groupId> | ||
<artifactId>wildfly-swarm-plugin</artifactId> | ||
<version>${version.wildfly.swarm}</version> | ||
<configuration> | ||
<mainClass>com.redhat.training.example.buildsformanagers.configuration.Main</mainClass> | ||
</configuration> | ||
|
||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>package</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>org.wildfly.swarm</groupId> | ||
<artifactId>jpa</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.wildfly.swarm</groupId> | ||
<artifactId>jaxrs</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.wildfly.swarm</groupId> | ||
<artifactId>ejb</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.wildfly.swarm</groupId> | ||
<artifactId>datasources</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.h2database</groupId> | ||
<artifactId>h2</artifactId> | ||
<version>1.4.187</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |
Oops, something went wrong.