Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit cfc5b80

Browse files
committed
add manual steps to setup tc databases in informix docker
1 parent aa6defd commit cfc5b80

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Guide
2+
3+
Run the commands
4+
```
5+
# download the image
6+
docker pull ibmcom/informix-developer-database:latest
7+
8+
# run the informix image
9+
docker run -it --name iif_developer_edition --privileged -p 9088:9088 -p 9089:9089 -p 27017:27017 -p 27018:27018 -p 27883:27883 -e LICENSE=accept ibmcom/informix-developer-database:latest
10+
```
11+
12+
Copy the following files to the container:
13+
* apache-ant-1.9.8-bin.tar.gz - download it from http://mirrors.cnnic.cn/apache//ant/binaries/apache-ant-1.9.8-bin.tar.gz
14+
* files/ant-libs.tgz - it will extracted to apache-ant
15+
* tc-database-scripts - download it from https://github.com/appirio-tech/tc-database-scripts
16+
* files/build.properties - it will be copied to tc-database-scripts
17+
18+
You can use command like `docker cp {file} iif_developer_edition:/` to copy files to the root of the container, where {file} is the file or directory above.
19+
20+
Now log into the container with command `docker exec -it iif_developer_edition bash`, and execute the following commands in the container:
21+
'''
22+
# install jdk
23+
sudo apt-get update
24+
sudo apt-get install -y openjdk-7-jdk
25+
26+
# extract apache-ant to /opt
27+
tar -xzvf apache-ant-1.9.8-bin.tar.gz -C /opt
28+
29+
# extract the ant-libs to apache-ant's lib directory
30+
tar -xzvf /ant-libs.tgz -C /opt/apache-ant-1.9.8/lib
31+
32+
# create 4G datadbs dbspace
33+
touch /home/informix/data/spaces/datadbs.000
34+
chmod 660 /home/informix/data/spaces/datadbs.000
35+
onspaces -c -d datadbs -p /home/informix/data/spaces/datadbs.000 -o 0 -s 4194304
36+
37+
# copy the build.properties to tc-database-scripts
38+
cp /build.properties /tc-database-scripts
39+
40+
# copy the tc-database-scripts/connfile.sql.example as connfile.sql
41+
cp /tc-database-scripts/connfile.sql.example /tc-database-scripts/connfile.sql
42+
43+
# go to tc-database-scripts directory and setup db
44+
cd /tc-database-scripts
45+
/opt/apache-ant-1.9.8/bin/ant setup_db
46+
'''
1.61 MB
Binary file not shown.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# TopCoder Software Component Development Environment
2+
3+
# Informix environment variables
4+
INFORMIXDIR=/opt/IBM/informix
5+
DBACCESS=/opt/IBM/informix/bin/dbaccess
6+
INFORMIXSERVER=dev
7+
INFORMIXSQLHOSTS=/opt/IBM/informix/etc/sqlhosts.dev
8+
9+
# Properties to automatically start/stop Jboss. Supposed to be used mostly for Continuos Integration server
10+
# update_db=uncomment to reinstall db on each redeploy
11+
jdk_home=<<path to jdk>>
12+
bind_addr=127.0.0.1
13+
jnp_port=1099
14+
jboss_heap_size=512m
15+
sleep_before_stopping=10
16+
17+
# The location of the deployment directory for JBoss server.
18+
JBOSS_HOME=<<path_to_jboss>>
19+
20+
# Database server information
21+
database.server=localhost
22+
database.port=9088
23+
database.username=informix
24+
database.password=in4mix
25+
26+
# Whether to stop running scripts if any script failed.
27+
stoponerror=true
28+
29+
# SVN credentials
30+
svn.username=xxx
31+
svn.password=xxx
32+
33+
# if set, database scripts will be updated before setting up db.
34+
# svn.update=yes
35+
36+
# Important, a security lock to avoid dropping all databases
37+
dropdatabase=yes
38+
39+
# OnlineReview repository location to start/stop tools
40+
or_path=<<or_repository_path>>

0 commit comments

Comments
 (0)