Skip to content

Commit 1b99c54

Browse files
padambenganiDjelibeybihemalavivek
authored
Oracle Analytics Server 6.4 public dockerfiles (#2511)
Co-authored-by: Avi Miller <[email protected]> Co-authored-by: hemalavivek <[email protected]>
1 parent 06ee92e commit 1b99c54

File tree

10 files changed

+860
-0
lines changed

10 files changed

+860
-0
lines changed

OracleAnalytics/README.md

+250
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
# Oracle Analytics Server Container
2+
3+
Sample container configurations facilitate
4+
installation, configuration, and environment setup for DevOps users.
5+
This project includes quick start
6+
[container](dockerfiles/) for Oracle Analytics Server 2022 (6.4)
7+
based on Oracle Linux 7, Oracle JRE 8 (Server),
8+
and Oracle Fusion Middleware Infrastructure 12.2.1.4.0.
9+
10+
For more information about Oracle Analytics Server,
11+
see the [Oracle Analytics Server Online Documentation](https://docs.oracle.com/en/middleware/bi/analytics-server/index.html).
12+
13+
The certification of Oracle Analytics Server Container
14+
doesn't require the use of any file presented in this repository.
15+
Customers and users are welcome to use the files in this repository
16+
as starter templates to customize or tweak,
17+
or to create scripts and container files from scratch.
18+
19+
For pre-built images containing Oracle software, check the [Oracle Container Registry](https://container-registry.oracle.com).
20+
21+
## Database Prerequisites
22+
23+
You must have a running Oracle Database, either in a container or on a host.
24+
You need these database connection details
25+
to create mid-tier schemas for the BI domain.
26+
The schemas are created automatically when the BI container starts.
27+
28+
If you're using an Oracle multitenant container database (CDB)
29+
or pluggable database (PDB) database,
30+
you must use PDB when creating the schemas because CDB isn’t supported.
31+
32+
You can create an Oracle Database container by using an
33+
[OracleDatabase](https://github.com/oracle/docker-images/tree/master/OracleDatabase)
34+
image.
35+
Follow these instructions to create a 12.1 or 12.2 Enterprise Edition database.
36+
37+
## Oracle Analytics Server Container Image Creation
38+
39+
Before you can build a BI image, you will need to build the [Oracle Java](https://github.com/oracle/docker-images/tree/master/OracleJava) image and the [Oracle Fusion Middleware](https://github.com/oracle/docker-images/tree/master/OracleFMWInfrastructure) image or pull pre-built images of each from the [Oracle Container Registry](https://container-registry.oracle.com).
40+
41+
### Building the Oracle Analytics Server Image
42+
43+
Download the binaries for
44+
[Oracle Analytics Server 2022 (6.4)](https://www-sites.oracle.com/solutions/business-analytics/analytics-server/analytics-server.html)
45+
for Linux x86-64-bit into the folder `OracleAnalytics/dockerfiles/6.4`.
46+
47+
If you need a proxy for the host to access yum.oracle.com during build,
48+
first set up the appropriate environment. For example:
49+
50+
```bash
51+
export http_proxy=myproxy.example.com:80
52+
export https_proxy=myproxy.example.com:80
53+
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
54+
```
55+
56+
Build the image:
57+
58+
```bash
59+
cd OracleAnalytics/dockerfiles
60+
./buildContainerImage.sh -v 6.4
61+
```
62+
63+
Sample command(s) for users who don't want to use the above script to build the image:
64+
65+
```bash
66+
# without proxy
67+
docker build --force-rm=true --no-cache=true -t oracle/analyticsserver:6.4 -f Dockerfile .
68+
69+
# with proxy
70+
docker build --force-rm=true --no-cache=true --build-arg http_proxy=http://myproxy.example.com:80 --build-arg https_proxy=https://myproxy.example.com:80 -t oracle/analyticsserver:6.4 -f Dockerfile .
71+
```
72+
73+
### Building the Oracle Analytics Server Patched Image
74+
75+
See the [Oracle Analytics patched image documentation](./patches/6.4-patch) for details.
76+
77+
## Creating an Oracle Analytics Server Container
78+
79+
The BI image provides a script to create and start a single-node BI domain,
80+
with the SampleApp Lite application.
81+
82+
This script is invoked when a container is started using the image.
83+
Subsequently, if the container restarts,
84+
the BI domain restarts automatically.
85+
86+
The BI image doesn't support scale-out or upgrade
87+
to any future Oracle Analytics Server patch set release.
88+
89+
### Starting a New Container
90+
91+
The following variables are mandatory when starting the container:
92+
93+
* `ADMIN_USERNAME` - WebLogic admin username for the new domain
94+
* `ADMIN_PASSWORD` - WebLogic admin password
95+
* `DB_HOST` - Host name for database into which to create schemas
96+
* `DB_PORT` - Database listener port
97+
* `DB_SERVICE` - Database instance service name
98+
* `DB_USERNAME` - Database sysdba username
99+
* `DB_PASSWORD` - Database sysdba password
100+
* `SCHEMA_PREFIX` - Schema prefix for new schemas in the new domain. The schema prefix must be unique. If it’s already in use, domain creation fails.
101+
* `SCHEMA_PASSWORD` - Password for all new schemas created
102+
103+
The following variables are predefined:
104+
105+
`ORACLE_HOME` is `/u01/oracle`.
106+
`DOMAIN_HOME` is `/u01/oracle/user_projects/domains/bi`.
107+
108+
For example:
109+
110+
```bash
111+
docker run -d --name bi -p 9500:9500 -p 9502:9502 -e ADMIN_USERNAME=weblogic -e ADMIN_PASSWORD=<admin_password> -e DB_HOST=database -e DB_PORT=1521 -e DB_SERVICE=ORCLPDB1 -e DB_USERNAME=sys -e DB_PASSWORD=<db_password> -e SCHEMA_PREFIX=DEV -e SCHEMA_PASSWORD=<schema_password> oracle/analyticsserver:6.4-patch
112+
```
113+
114+
Change _<...password>_ to your required values, and DB values to match your database.
115+
116+
On success, logs the following:
117+
`The configuration of Oracle Fusion Middleware completed successfully.`.
118+
The script then tails the domain log to stdout.
119+
120+
The BI domain uses the following ports:
121+
122+
* `9500` - WebLogic AdminServer
123+
* `9502` - WebLogic `bi_server1` managed server, hosting BI JEE apps
124+
* `9508` - OBI Cluster Controller, providing access to OBI Server system component
125+
* `9514` - OBI Server system component
126+
127+
The following example URLs provide access to the BI domain:
128+
129+
* <http://www.example.com:9500/console> - WebLogic Admin Console
130+
* <http://www.example.com:9502/analytics> - BI Answers/Dashboards
131+
* <http://www.example.com:9502/va> - Data Visualization
132+
* <http://www.example.com:9502/xmlpserver> - BI Publisher
133+
134+
If access to the OBI Server component is required,
135+
for example by the BI Administration Tool,
136+
you must modify the previous `docker run` command to expose port 9514.
137+
138+
For example:
139+
140+
```bash
141+
docker run -it -p 9500:9500 -p 9502:9502 -p 9514:9514 -e ADMIN_USERNAME=weblogic -e ADMIN_PASSWORD=<admin_password> -e DB_HOST=database -e DB_PORT=1521 -e DB_SERVICE=ORCLPDB1 -e DB_USERNAME=sys -e DB_PASSWORD=<db_password> -e SCHEMA_PREFIX=DEV -e SCHEMA_PASSWORD=<schema_password> oracle/analyticsserver:6.4-patch
142+
```
143+
144+
### Using a Host Directory for Persistent Data
145+
146+
In the basic usage above,
147+
the container stores the persistent data in
148+
DOMAIN_HOME, APPLICATIONS_DIR, and SINGLETON_DATA_DIRECTORY.
149+
If the container is deleted, the data is lost.
150+
151+
You can use a data volume for `/u01/oracle/user_projects`
152+
to store persistent data on the host disk.
153+
For example, to mount a host directory as a data volume:
154+
155+
```bash
156+
mkdir -p /scratch/bi && chmod 700 /scratch/bi && chown 1000:1000 /scratch/bi
157+
docker run -v /scratch/bi:/u01/oracle/user_projects ......
158+
```
159+
160+
`chown` is necessary to ensure that the directory has the same UID/GID as the user inside the container i.e. 'oracle'.
161+
162+
### Using a Database Container
163+
164+
In the above example,
165+
`DB_HOST` specifies the host name for the database instance.
166+
You must set up a container user-defined network
167+
if you want to use a database container or the legacy `--link` feature.
168+
169+
For example,
170+
171+
1. Create a user-defined network using the bridge driver:
172+
$ docker network create -d bridge bi_net
173+
174+
2. Start a database container using the above network:
175+
176+
$ docker run --name database --network=bi_net ...... oracle/database:12.1.0.2-ee
177+
178+
3. Start a BI container that uses the database by name:
179+
180+
$ docker run --name bi --network=bi_net -e DB_HOST=database ...... oracle/analyticsserver:6.4-patch
181+
182+
Note: In the above container run examples, other parameters are omitted for clarity.
183+
184+
### Passing Configuration Environment by Mounted File or Container Secrets
185+
186+
The domain creation script also supports
187+
loading the same set of environment key/value pairs
188+
from files mounted into the container,
189+
using `docker run -v` or container secrets.
190+
191+
The following files are processed if available,
192+
overriding any environment already set:
193+
194+
* For ADMIN_USERNAME/ADMIN_PASSWORD: `/run/secrets/admin.txt`
195+
* For DB_USERNAME/DB_PASSWORD: `/run/secrets/db.txt`
196+
* For SCHEMA_PASSWORD: `/run/secrets/schema.txt`
197+
* For providing all keys: `/run/secrets/config.txt`
198+
199+
Each *.txt file must contain lines of `key=value` pairs.
200+
201+
### Using Container Compose
202+
203+
The BI image supports using `docker-compose` to start the BI and DB containers together.
204+
205+
In this mode, the containers are started in parallel,
206+
and the BI container must wait for the DB to become available.
207+
The wait time is enabled by setting environment variable `DB_WAIT_TIMEOUT`
208+
to the maximum number of seconds to wait.
209+
For example, in your `docker-compose.yml`, add:
210+
211+
```yaml
212+
environment:
213+
- DB_WAIT_TIMEOUT=240
214+
```
215+
216+
## Known Issues
217+
218+
1. The domain's node manager is configured to listen on the network interface
219+
for the container's original host name,
220+
rather than on all interfaces.
221+
Therefore, if you create a container using an existing data volume for `/u01/oracle/user_projects`,
222+
you must ensure you use the same host name. For example,
223+
224+
```bash
225+
docker run --hostname original_hostname ......
226+
```
227+
228+
2. If the container is restarted,
229+
pass the same set of environment variables again,
230+
even though the domain has already been created.
231+
232+
3. Container health check isn't implemented.
233+
234+
## License
235+
236+
To download and run Oracle Analytics Server Distribution
237+
regardless of inside or outside a container,
238+
and regardless of the distribution,
239+
you must download the binaries from the Oracle website
240+
and accept the license indicated on that page.
241+
242+
All scripts and files hosted in this project
243+
and GitHub [docker/OracleAnalyticsServer](./) repository
244+
required to build the container images are,
245+
unless otherwise noted,
246+
released under the Universal Permissive License v 1.0 as shown at <https://oss.oracle.com/licenses/upl>.
247+
248+
## Copyright
249+
250+
Copyright (c) 2022 Oracle and/or its affiliates.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2022 Oracle and/or its affiliates.
2+
#
3+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4+
#
5+
# Download Oracle Business Intelligence Installer 12.2.1.3
6+
#
7+
# - http://www.oracle.com/technetwork/middleware/bi/downloads/default-3852322.html
8+
#
9+
223126d67c38042da06e7635bd9ffd1b Oracle_Analytics_Server_Linux_2022(6.4).zip
+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Copyright (c) 2022 Oracle and/or its affiliates.
2+
#
3+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4+
#
5+
# ORACLE DOCKERFILES PROJECT
6+
# --------------------------
7+
# This is the Dockerfile for Oracle Analytics Server 2022 (6.4)
8+
#
9+
# REQUIRED FILE(S) TO BUILD THIS IMAGE
10+
# ----------------------------------
11+
# (1) Oracle_Analytics_Server_Linux_2022(6.4).zip
12+
# Download the installer file from https://www-sites.oracle.com/solutions/business-analytics/analytics-server/analytics-server.html
13+
#
14+
# HOW TO BUILD THIS IMAGE
15+
# -----------------------
16+
# Put all downloaded files in the same directory as this Dockerfile
17+
# Run:
18+
# $ docker build -t oracle/analyticsserver:6.4 .
19+
#
20+
# Pull base image
21+
# ---------------
22+
FROM oracle/fmw-infrastructure:12.2.1.4
23+
24+
# Labels
25+
# ------
26+
LABEL "maintainer"="Padam Bengani <[email protected]>"
27+
28+
#Common ENV
29+
#-----------
30+
ENV ORACLE_HOME=/u01/oracle
31+
32+
# Environment variables required for this build (do NOT change)
33+
# (DOMAIN_NAME/HOME are reset here, to avoid FMW Infra environment leaking through)
34+
# -------------------------------------------------------------
35+
ENV BI_DISTRO_ZIP1=Oracle_Analytics_Server_Linux_2022(6.4).zip \
36+
BI_INSTALLER1=Oracle_Analytics_Server_Linux_6.4.0.jar \
37+
DOMAIN_NAME="${BI_DOMAIN_NAME:-bi}" \
38+
DOMAINS_DIR=$ORACLE_HOME/user_projects/domains \
39+
DOMAIN_HOME=$ORACLE_HOME/user_projects/domains/${BI_DOMAIN_NAME:-bi}
40+
41+
# Copy packages
42+
# -------------
43+
COPY $BI_DISTRO_ZIP1 install.file oraInst.loc /u01/
44+
45+
# Install
46+
#-------------------------------------------------------------
47+
USER root
48+
49+
# tools for installing and running BI
50+
RUN yum -y install unzip hostname && rm -rf /var/cache/yum
51+
52+
USER oracle
53+
RUN unzip "/u01/$BI_DISTRO_ZIP1" -d /u01 && \
54+
"$JAVA_HOME/bin/java" -jar "/u01/$BI_INSTALLER1" -silent -responseFile /u01/install.file \
55+
-invPtrLoc /u01/oraInst.loc -ignoreSysPrereqs -force -novalidation ORACLE_HOME="$ORACLE_HOME" \
56+
INSTALL_TYPE="Oracle Analytics" && \
57+
rm "/u01/$BI_DISTRO_ZIP1" "/u01/$BI_INSTALLER1" /u01/oraInst.loc /u01/install.file
58+
59+
WORKDIR $ORACLE_HOME
60+
61+
# Prepare for Config
62+
#-------------------------------------------------------------
63+
EXPOSE 9500-9999
64+
COPY createAndStartDomain.sh wait_for_db.sh /u01/
65+
66+
CMD ["/u01/createAndStartDomain.sh"]

0 commit comments

Comments
 (0)