Skip to content

Commit e377154

Browse files
author
Tim Pouyer
committed
moving towards a working image
1 parent 5bffc2b commit e377154

5 files changed

Lines changed: 40 additions & 12 deletions

File tree

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ EXPOSE 8000
1717
EXPOSE 8003
1818
EXPOSE 8004
1919
EXPOSE 5000
20+
EXPOSE 5672
2021

2122
EXPOSE 22
2223

24+
ENV PUBLIC_HOSTNAME ${PUBLIC_HOSTNAME:-$HOSTNAME}
25+
2326
RUN cd /tmp/ibm-ucd-patterns-install/engine-install && \
2427
JAVA_HOME=/tmp/ibm-ucd-patterns-install/engine-install/media/engine/java/jre \
2528
JAVA_OPTS=" -Dlicense.accepted=Y -Dinstall.engine.dependencies.installed=Y \

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
11
### docker-uc-pattern-engine
2+
3+
builds a docker image with UrbanCode Deploy with Patterns HEAT engine (and plugin extensions)
4+
5+
To run:
6+
7+
- git clone stackinabox/docker-supervisord and build it follwing the README.md in the repo
8+
9+
- git clone stackinabox/docker-uc-pattern-engine.git
10+
11+
- Download UCD with Patterns HEAT engine installer zip and extract it into 'artifacts' folder
12+
You are on your own for finding this since it's a licensed product
13+
14+
- Build the image:
15+
16+
````
17+
docker build -t stackinabox/urbancode-patterns-engine:%version% .
18+
````
19+
20+
- Now your ready to run the patterns-engine container. The command below supplies the container with a couple of ENV properties
21+
- PUBLIC_HOSTNAME: a resolveable dns name for this container, you can add an entry to your /etc/hosts file for a quick solution
22+
- ALLOWED_AUTH_URIS: This value is used by the embedded HEAT engine to determine which OpenStack Keystone endpoints will be allowed to operate this engine
23+
24+
````
25+
docker run -d --name urbancode_patterns_engine -e PUBLIC_HOSTNAME=docker -e ALLOWED_AUTH_URIS=http://192.168.27.100:5000/v2.0 -p 8000:8000 -p 8003:8003 -p 8004:8004 stackinabox/urbancode-patterns-engine:%version%
26+
````

post-configure-identity-service.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if netstat -ant | grep 5000; then
1414
USER_DIR=/root
1515

1616
sed -i "s/KEYSTONE_URL/http:\/\/${PUBLIC_HOSTNAME}:35357\/v2.0/" $USER_DIR/keystonerc
17-
sed -i "s/ENGINE_HOSTNAME/$PUBLIC_HOSTNAME/g" $USER_DIR/keystonerc
17+
sed -i "s/ENGINE_HOSTNAME/${PUBLIC_HOSTNAME}/g" $USER_DIR/keystonerc
1818
cat $USER_DIR/keystonerc
1919

2020
. $USER_DIR/keystonerc
@@ -35,13 +35,13 @@ if netstat -ant | grep 5000; then
3535
keystone service-delete $id;
3636
done
3737

38-
/root/configure-identity-service
38+
/root/configure-identity-service.sh
3939

4040
echo "
4141
Use the following settings to connect OpenStack:
4242
"
43-
sed -i "s/KEYSTONE_URL/http:\/\/${PUBLIC_HOSTNAME}:35357\/v2.0/" $USER_DIR/clientrc
44-
sed -i "s/ENGINE_HOSTNAME/$PUBLIC_HOSTNAME/g" $USER_DIR/clientrc
43+
sed -i "s/KEYSTONE_URL/http:\/\/${PUBLIC_HOSTNAME}:35357\/v2.0/g" $USER_DIR/clientrc
44+
sed -i "s/ENGINE_HOSTNAME/${PUBLIC_HOSTNAME}/g" $USER_DIR/clientrc
4545

4646
cat $USER_DIR/clientrc
4747

startup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fi
3131
env
3232

3333
sed -i "s/ENGINE_HOSTNAME/$PUBLIC_HOSTNAME/g" /etc/heat/heat.conf
34-
sed -i "s/\(allowed_auth_uris=\).*\$/\1http:\/\/${PUBLIC_HOSTNAME}:5000\/v2.0,${ALLOWED_AUTH_URIS}/" /etc/heat/heat.conf
34+
sed -i "s|\(allowed_auth_uris=\).*\$|\1http:\/\/${PUBLIC_HOSTNAME}:5000\/v2.0,${ALLOWED_AUTH_URIS}|g" /etc/heat/heat.conf
3535

3636
#chmod u+x /root/post-configure-identity-service.sh
3737
mkdir /root/.qpidd

supervisord.conf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ loglevel=debug
55
[program:sshd]
66
command=/usr/sbin/sshd -D
77

8-
#[program:rabbitmq]
9-
#command=/usr/sbin/rabbitmq-server
10-
#user=root
11-
#redirect_stderr=true
12-
13-
[program:qpidd]
14-
command=/usr/sbin/qpidd --data-dir /root/.qpidd --log-to-file /var/log/qpidd.log --pid-dir /root/.qpidd
8+
[program:rabbitmq]
9+
command=/usr/sbin/rabbitmq-server
1510
user=root
1611
redirect_stderr=true
1712

13+
#[program:qpidd]
14+
#command=/usr/sbin/qpidd --data-dir /root/.qpidd --log-to-file /var/log/qpidd.log --pid-dir /root/.qpidd
15+
#user=root
16+
#redirect_stderr=true
17+
1818
[program:openstack-keystone]
1919
command=/usr/bin/keystone-all --config-file /etc/keystone/keystone.conf
2020
user=keystone

0 commit comments

Comments
 (0)