Skip to content

Commit d4db345

Browse files
xiancaorjeberhard
authored andcommitted
change jrf docker image to OCR
1 parent 34ba5ba commit d4db345

File tree

10 files changed

+35
-75
lines changed

10 files changed

+35
-75
lines changed

integration-tests/README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -300,16 +300,9 @@ JUnit test results can be seen at "integration-tests/target/failsafe-reports/TES
300300
* Setup docker access to FMW Infrastructure 12c Image and Oracle Database 12c Image
301301

302302
Method 1
303-
- Setup a personal account on hub.docker.com
304-
- Then sign in to hub.docker.com and signup for access to Oracle Database 12c Images via https://hub.docker.com/_/oracle-database-enterprise-edition
305-
- Then export the following before running the tests:
306-
```
307-
export DOCKER_USERNAME=<docker_username>
308-
export DOCKER_PASSWORD=<docker_password>
309-
export DOCKER_EMAIL=<docker_email>
310-
```
311-
- Setup an account in phx.ocir.io
312-
- Then sign in to phx.ocir.io to get access to FMW Infrastructure 12c Image: **_phx.ocir.io/weblogick8s/oracle/fmw-infrastructure:12.2.1.3_**
303+
- Setup a personal account on container-registry.oracle.com
304+
- Then sign in to container-registry.oracle.com and accept license for access to Oracle Database 12c Images: **_container-registry.oracle.com/database/enterprise:12.2.0.1-slim_**
305+
- And get access to FMW Infrastructure 12c Image: **_container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3_**
313306
- export the following before running the tests:
314307
```
315308
export REPO_USERNAME=<ocir_username>
@@ -318,7 +311,7 @@ JUnit test results can be seen at "integration-tests/target/failsafe-reports/TES
318311
```
319312
320313
Method 2
321-
- Make sure the FMW Infrastructure image i.e. **_phx.ocir.io/weblogick8s/oracle/fmw-infrastructure:12.2.1.3_** and the Oracle database image i.e. **_store/oracle/database-enterprise:12.2.0.1_** already exist locally in a docker repository the k8s cluster can access
314+
- Make sure the FMW Infrastructure image i.e. **_container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3_** and the Oracle database image i.e. **_container-registry.oracle.com/database/enterprise:12.2.0.1-slim_** already exist locally in a docker repository the k8s cluster can access
322315
323316
* Command to run the tests:
324317
```

integration-tests/src/test/java/oracle/kubernetes/operator/utils/DBUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
public class DBUtils {
1111
public static final String DEFAULT_FMWINFRA_DOCKER_IMAGENAME =
12-
"phx.ocir.io/weblogick8s/oracle/fmw-infrastructure";
12+
"container-registry.oracle.com/middleware/fmw-infrastructure";
1313
public static final String DEFAULT_FMWINFRA_DOCKER_IMAGETAG = "12.2.1.3";
1414
public static final String DEFAULT_RCU_SCHEMA_USERNAME = "myrcuuser";
1515
public static final String DEFAULT_RCU_SCHEMA_PASSWORD = "Oradoc_db1";

integration-tests/src/test/java/oracle/kubernetes/operator/utils/OracleDB.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ public class OracleDB {
1212
// DB default properties
1313
public static final String DEFAULT_DB_NAME = "infradb";
1414
public static final String DEFAULT_DB_NAMESPACE = "db";
15-
public static final String DEFAULT_DB_IMAGE = "store/oracle/database-enterprise:12.2.0.1";
15+
public static final String DEFAULT_DB_IMAGE =
16+
"container-registry.oracle.com/database/enterprise:12.2.0.1-slim";
1617
public static final String DEFAULT_DB_PORT = "1521";
1718
public static final String DEFAULT_DB_SID = "InfraDB";
1819
public static final String DEFAULT_DB_PDB = "InfraPDB1";

integration-tests/src/test/resources/jrfdomainadminonly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ serverStartPolicy: ADMIN_ONLY
1818
loadBalancer: TRAEFIK
1919
ingressPerDomain: true
2020
voyagerWebPort: 30309
21-
image: phx.ocir.io/weblogick8s/oracle/fmw-infrastructure:12.2.1.3
21+
image: container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3
2222
rcuSchemaPrefix: jrfdomain4
2323
rcuDatabaseURL: infradb.db.svc.cluster.local:1521/InfraPDB1.us.oracle.com

integration-tests/src/test/resources/jrfdomainonpvwlst.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exposeAdminT3Channel: true
1313
t3ChannelPort: 30013
1414
exposeAdminNodePort: true
1515
namespace: jrfdomains
16-
image: phx.ocir.io/weblogick8s/oracle/fmw-infrastructure:12.2.1.3
16+
image: container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3
1717
ingressPerDomain: true
1818
rcuSchemaPrefix: jrfdomain
1919
rcuDatabaseURL: infradb.db.svc.cluster.local:1521/InfraPDB1.us.oracle.com

integration-tests/src/test/resources/jrfdomainonpvwlst2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exposeAdminT3Channel: true
1313
t3ChannelPort: 30014
1414
exposeAdminNodePort: true
1515
namespace: test2
16-
image: phx.ocir.io/weblogick8s/oracle/fmw-infrastructure:12.2.1.3
16+
image: container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3
1717
ingressPerDomain: true
1818
rcuSchemaPrefix: jrfdomain2
1919
rcuDatabaseURL: infradb.db.svc.cluster.local:1521/InfraPDB1.us.oracle.com

integration-tests/src/test/resources/jrfdomainrecyclepolicy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ loadBalancer: TRAEFIK
1919
ingressPerDomain: true
2020
voyagerWebPort: 30311
2121
clusterType: CONFIGURED
22-
image: phx.ocir.io/weblogick8s/oracle/fmw-infrastructure:12.2.1.3
22+
image: container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3
2323
rcuSchemaPrefix: jrfrecycle
2424
rcuDatabaseURL: infradb.db.svc.cluster.local:1521/InfraPDB1.us.oracle.com

integration-tests/src/test/resources/jrfdomainsampledefaults.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ ingressPerDomain: true
99
voyagerWebPort: 30310
1010
rcuSchemaPrefix: jrfsampledef
1111
rcuDatabaseURL: infradb.db.svc.cluster.local:1521/InfraPDB1.us.oracle.com
12+
image: container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3

integration-tests/src/test/resources/oracledb.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
name=infradb
55
namespace=db
6-
image=store/oracle/database-enterprise:12.2.0.1
6+
image=container-registry.oracle.com/database/enterprise:12.2.0.1-slim
77
port=1521
88
db_sid=InfraDB
99
db_pdb=InfraPDB1

integration-tests/src/test/resources/setupenv.sh

Lines changed: 22 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -138,64 +138,29 @@ function pull_tag_images {
138138

139139
function pull_tag_images_jrf {
140140

141-
set +x
141+
set +x
142142
# Check if fwm infra image exists
143-
if [ -z "$REPO_USERNAME" ] || [ -z "$REPO_PASSWORD" ] || [ -z "$REPO_EMAIL" ]; then
143+
if [ -z "$OCR_USERNAME" ] || [ -z "$OCR_PASSWORD" ]; then
144144
if [ -z $(docker images -q $IMAGE_NAME_WEBLOGIC:$IMAGE_TAG_WEBLOGIC) ]; then
145-
echo "Image $IMAGE_NAME_WEBLOGIC:$IMAGE_TAG_WEBLOGIC doesn't exist. Provide Docker login details using env variables REPO_USERNAME, REPO_PASSWORD and REPO_EMAIL to pull the image."
145+
echo "Image $IMAGE_NAME_FMWINFRA:$IMAGE_TAG_FMWINFRA doesn't exist. Provide Docker login details using env variables OCR_USERNAME and OCR_PASSWORD to pull the image."
146146
exit 1
147147
fi
148+
if [ -z $(docker images -q $IMAGE_NAME_ORACLEDB:$IMAGE_TAG_ORACLEDB) ]; then
149+
echo "Image $IMAGE_NAME_ORACLEDB:$IMAGE_TAG_ORACLEDB doesn't exist. Provide Docker login details using env variables OCR_USERNAME and OCR_PASSWORD to pull the image."
150+
exit 1
151+
fi
148152
fi
149153

150-
# Create secret to pull fmw infra image if required env variables are provided
151-
if [ -n "$REPO_USERNAME" ] && [ -n "$REPO_PASSWORD" ] && [ -n "$REPO_EMAIL" ]; then
152-
echo "Creating Registry Secret"
153-
kubectl create secret docker-registry $IMAGE_PULL_SECRET_WEBLOGIC \
154-
--docker-server=phx.ocir.io \
155-
--docker-username=$REPO_USERNAME \
156-
--docker-password=$REPO_PASSWORD \
157-
--docker-email=$REPO_EMAIL
158-
echo "Checking Secret"
159-
SECRET="`kubectl get secret $IMAGE_PULL_SECRET_WEBLOGIC | grep $IMAGE_PULL_SECRET_WEBLOGIC | wc | awk ' { print $1; }'`"
160-
if [ "$SECRET" != "1" ]; then
161-
echo "secret $IMAGE_PULL_SECRET_WEBLOGIC was not created successfully"
162-
exit 1
163-
fi
154+
# reuse the create secret logic
155+
pull_tag_images
164156

165-
# pull fmw infra images
166-
docker pull $IMAGE_NAME_WEBLOGIC:$IMAGE_TAG_WEBLOGIC
167-
fi
168-
169-
# Check if OracleDB image exists
170-
if [ -z "$DOCKER_USERNAME" ] || [ -z "$DOCKER_PASSWORD" ] || [ -z "$DOCKER_EMAIL" ]; then
171-
if [ -z $(docker images -q $IMAGE_NAME_ORACLEDB:$IMAGE_TAG_ORACLEDB) ]; then
172-
echo "Image $IMAGE_NAME_ORACLEDB:$IMAGE_TAG_ORACLEDB doesn't exist. Provide Docker login details using env variables DOCKER_USERNAME, DOCKER_PASSWORD and DOCKER_EMAIL to pull the image."
173-
exit 1
174-
fi
175-
fi
176-
177-
# Create secret to pull OracleDB image if required env variables are provided
178-
if [ -n "$DOCKER_USERNAME" ] && [ -n "$DOCKER_PASSWORD" ] && [ -n "$DOCKER_EMAIL" ]; then
179-
echo "Creating Docker Secret"
180-
181-
kubectl create secret docker-registry $IMAGE_PULL_SECRET_ORACLEDB \
182-
--docker-server=index.docker.io/v1/ \
183-
--docker-username=$DOCKER_USERNAME \
184-
--docker-password=$DOCKER_PASSWORD \
185-
--docker-email=$DOCKER_EMAIL
186-
187-
echo "Checking Secret"
188-
SECRET="`kubectl get secret $IMAGE_PULL_SECRET_ORACLEDB | grep $IMAGE_PULL_SECRET_ORACLEDB | wc | awk ' { print $1; }'`"
189-
if [ "$SECRET" != "1" ]; then
190-
echo "secret $IMAGE_PULL_SECRET_ORACLEDB was not created successfully"
191-
exit 1
192-
fi
193-
194-
# pull oracle db image
195-
docker pull $IMAGE_NAME_ORACLEDB:$IMAGE_TAG_ORACLEDB
196-
fi
197-
set -x
157+
# pull fmw infra images
158+
docker pull $IMAGE_NAME_FMWINFRA:$IMAGE_TAG_FMWINFRA
159+
160+
# pull oracle db image
161+
docker pull $IMAGE_NAME_ORACLEDB:$IMAGE_TAG_ORACLEDB
198162

163+
set -x
199164
}
200165

201166
function get_wlthint3client_from_image {
@@ -220,14 +185,14 @@ export BRANCH_NAME="${BRANCH_NAME:-$SHARED_CLUSTER_GIT_BRANCH}"
220185
export IMAGE_TAG_WEBLOGIC="${IMAGE_TAG_WEBLOGIC:-12.2.1.3-190111}"
221186

222187
if [ "$JRF_ENABLED" = true ] ; then
223-
export IMAGE_NAME_WEBLOGIC="${IMAGE_NAME_WEBLOGIC:-phx.ocir.io/weblogick8s/oracle/fmw-infrastructure}"
224-
export IMAGE_PULL_SECRET_WEBLOGIC="ocir-store"
225-
export IMAGE_NAME_ORACLEDB="${IMAGE_NAME_ORACLEDB:-store/oracle/database-enterprise}"
226-
export IMAGE_TAG_ORACLEDB="${IMAGE_TAG_ORACLEDB:-12.2.0.1}"
227-
export IMAGE_PULL_SECRET_ORACLEDB="${IMAGE_PULL_SECRET_ORACLEDB:-docker-store}"
228-
188+
export FMWINFRA_IMAGE_URI=/middleware/fmw-infrastructure
189+
export IMAGE_TAG_FMWINFRA=12.2.1.3
190+
export DB_IMAGE_URI=/database/enterprise
191+
export IMAGE_NAME_ORACLEDB="${IMAGE_NAME_ORACLEDB:-`echo ${WL_DOCKER_SERVER}``echo ${DB_IMAGE_URI}`}"
192+
export IMAGE_TAG_ORACLEDB="${IMAGE_TAG_ORACLEDB:-12.2.0.1-slim}"
229193
fi
230194
export IMAGE_NAME_WEBLOGIC="${IMAGE_NAME_WEBLOGIC:-`echo ${WL_DOCKER_SERVER}``echo ${WLS_IMAGE_URI}`}"
195+
export IMAGE_NAME_FMWINFRA="${IMAGE_NAME_FMWINFRA:-`echo ${WL_DOCKER_SERVER}``echo ${FMWINFRA_IMAGE_URI}`}"
231196
export IMAGE_PULL_SECRET_WEBLOGIC="${IMAGE_PULL_SECRET_WEBLOGIC:-docker-store}"
232197

233198
if [ -z "$BRANCH_NAME" ]; then
@@ -369,4 +334,4 @@ else
369334
if [ "$JRF_ENABLED" = false ]; then
370335
get_wlthint3client_from_image
371336
fi
372-
fi
337+
fi

0 commit comments

Comments
 (0)