Skip to content

Commit ee644fe

Browse files
committed
Fix arun-gupta#12 - Add lab-settings.xml model fiel to instructor http server
1 parent 80527bb commit ee644fe

7 files changed

Lines changed: 106 additions & 8 deletions

File tree

attendees/readme.adoc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ set PATH=%PATH%;c:\docker
4949
5050
## Install Docker client
5151
52-
Download your binary from http://<INSTRUCTOR_IP:8082>/downloads/
52+
Download your binary from http://<INSTRUCTOR_IP>:8082/downloads/
5353
5454
[source, text]
5555
----
5656
# Linux / MacOS
5757
curl -L https://get.docker.com/builds/Darwin/x86_64/docker-latest > /usr/local/bin/docker
5858
5959
#Windows
60-
curl http://<INSTRUCTOR_IP:8082>/docker-1.6.0.exe
60+
curl http://<INSTRUCTOR_IP>:8082/docker-1.6.0.exe
6161
On Windows put into and rename to: c:\docker\docker.exe
6262
----
6363
@@ -78,7 +78,7 @@ eval "$(docker-machine env lab)"
7878
Download apache-maven-3.3.3-bin[.zip|tar.gz] from the instructor PC.
7979
[source, text]
8080
----
81-
curl http://<INSTRUCTOR_IP:8082>/apache-maven-3.3.3-bin[.zip|tar.gz]
81+
curl http://<INSTRUCTOR_IP>:8082/downloads/apache-maven-3.3.3-bin[.zip|tar.gz]
8282
----
8383

8484
unzip to a folder of your choice and add the folder to your PATH environment variable.
@@ -88,6 +88,13 @@ unzip to a folder of your choice and add the folder to your PATH environment var
8888
set PATH=%PATH%;c:/apache-maven-3.3.3
8989
----
9090

91+
## Prepare Maven settings.xml file
92+
93+
Download the lab-settings.xml file from http://<INSTRUCTOR_IP>:8082/downloads/lab-settings.xml
94+
95+
Edit the model file and replace the <INSTRUCTOR_IP>.
96+
97+
9198
## Setup JBoss Developer Studio
9299

93100
To install JBoss Developer Studio stand-alone, complete the following steps:

instructor/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dockerregistry:
22
image: registry:2.0
33
volumes:
4-
- /registry:/tmp/registry-dev
4+
- /srv/docker/registry:/tmp/registry-dev
55
ports:
66
- "5000:5000"
77
httpserver:

instructor/dockerfiles/lab-httpd-server/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ RUN wget http://test.docker.com.s3.amazonaws.com/builds/Windows/x86_64/docker-1.
4141
RUN wget http://apache.mirrors.ionfish.org/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.zip
4242
RUN wget http://apache.mirrors.ionfish.org/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
4343

44+
#Add other files to downloads
45+
ADD lab-settings.xml /var/www/html/downloads
46+
47+
4448
EXPOSE 80
4549

4650
# Simple startup script to avoid some issues observed with container restart
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
JBoss, Home of Professional Open Source
4+
Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
5+
contributors by the @authors tag. See the copyright.txt in the
6+
distribution for a full listing of individual contributors.
7+
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
21+
22+
<!-- proxies
23+
This is a list of proxies which can be used on this machine to connect to the network.
24+
Unless otherwise specified (by system property or command-line switch), the first proxy
25+
specification in this list marked as active will be used.If you are accessing network
26+
via a proxy server, Un-comment the proxy options and fill in your proxy server detail.
27+
-->
28+
<proxies>
29+
<!-- proxy
30+
Specification for one proxy, to be used in connecting to the network.
31+
32+
<proxy>
33+
<id>optional</id>
34+
<active>true</active>
35+
<protocol>http</protocol>
36+
<username>proxyuser</</username>
37+
<password>proxypass</password>
38+
<host>proxy.host.net</host>
39+
<port>80</port>
40+
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
41+
</proxy>
42+
-->
43+
</proxies>
44+
45+
<profiles>
46+
47+
<!-- Configure the Instructor Nexus repository -->
48+
<profile>
49+
<id>instructor-repository</id>
50+
<repositories>
51+
<repository>
52+
<id>instructor-nexus-repository</id>
53+
<url>http://<INSTRUCTOR_IP>:8081/content/groups/public/</url>
54+
<releases>
55+
<enabled>true</enabled>
56+
</releases>
57+
<snapshots>
58+
<enabled>false</enabled>
59+
</snapshots>
60+
</repository>
61+
</repositories>
62+
<pluginRepositories>
63+
<pluginRepository>
64+
<id>instructor-plugin-repository</id>
65+
<url>http://<INSTRUCTOR_IP>:8081/content/groups/public/</url>
66+
<releases>
67+
<enabled>true</enabled>
68+
</releases>
69+
<snapshots>
70+
<enabled>false</enabled>
71+
</snapshots>
72+
</pluginRepository>
73+
</pluginRepositories>
74+
</profile>
75+
76+
</profiles>
77+
78+
<activeProfiles>
79+
<!-- Make the repositories active by default -->
80+
<activeProfile>instructor-repository</activeProfile>
81+
</activeProfiles>
82+
83+
</settings>

instructor/readme.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ Access the gitlab server [http://localhost:10080/].
137137

138138
## Populate Gitlab with Ticket-monster sources
139139
In order to allow a complete offline experience, we also host our own git repository for the demo application on the instructor machine.
140+
141+
_Note: Gitlab must have completed his startup. It usually takes 3 minutes to do so._
140142
Execute:
141143

142144
[source,text]

instructor/settings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444

4545
<profiles>
4646

47-
<!-- Configure the JBoss GA Maven repository -->
47+
<!-- Configure the Instructor Nexus repository -->
4848
<profile>
4949
<id>instructor-repository</id>
5050
<repositories>
5151
<repository>
52-
<id>instructor-repository</id>
52+
<id>instructor-nexus-repository</id>
5353
<url>http://localhost:8081/content/groups/public/</url>
5454
<releases>
5555
<enabled>true</enabled>
@@ -76,7 +76,7 @@
7676
</profiles>
7777

7878
<activeProfiles>
79-
<!-- Optionally, make the repositories active by default -->
79+
<!-- Make the repositories active by default -->
8080
<activeProfile>instructor-repository</activeProfile>
8181
</activeProfiles>
8282

readme.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,14 @@ git clone -b WFLY8.1 http://root:dockeradmin@<INSTRUCTOR_IP>:10080/root/ticket-m
232232

233233
From here, you're free to explore the application a bit. Open it with JBDS and find more background about the use-cases and how the application is designed at the link:http://www.jboss.org/ticket-monster/whatisticketmonster/[Ticket Monster Website].
234234

235+
Copy the Maven lab-settings.xml file that you have downloaded from the instructor machine and place it inside /docker-java
236+
235237
When you're ready, it is time to build the application. Switch to the checkout directory and run maven package.
236238

237239
[source, text]
238240
----
239241
cd /docker-java/ticket-monster
240-
mvn -s settings.xml -f demo/pom.xml package
242+
mvn -s lab-settings.xml -f demo/pom.xml package
241243
----
242244

243245
Congratulations: You just build the applications war file. Let's see if this can be deployed.

0 commit comments

Comments
 (0)