Task:
Set-up registry access for image download from registry.
If using OCP 4 or OKD, push into the local registry.
Details:
In order to use podman, docker, or OCP 4 with the HCL registry (hclcr.io), we have to login using our normal HCL Software Download ID/password, obtain the access token, and then use the access token with the registry URL for the file desired.
Note:
- If you login to my.hcltechsw.com first, when you bring up the hclcr.io address, you will be already logged in after clicking the login button.
Part A: Steps to Pull from HCL Registry:
1. Login to my.hcltechsw.com/downloads:
- web browser --> ddd --> my.hcltechsw.com/downloads
- Enter Username (email)
- Enter Password
2. Login to hclcr.io using the HCL Software download site credentials
- web browser --> hclcr.io (address bar)--> LOGIN WITH Okta CIAM Prod (button)
(no username and password will be required)
3. Open the User Profile and Copy the CLI Secret:
a. Bring up User Profile:
- Click login email (upper right corner), e.g. mylogin@mindwatering.net --> User Profile
b. Copy the CLI token:
- CLI secret, click copy icon
(confirm message "copy success")
4. In the VM/Container Host, use the secret to login w/podman or docker:
$ podman login hclcr.io -u mylogin@mindwatering.net
Password: <enter CLI token>
<view success message: Login Succeeded!>
5. Pull the image:
$ podman pull hclcr.io/domino/domino-container:<imageTag>
<confirm successful>
Note:
- image tag is the version, such as 14.0
Part A: Steps to Load from Local File Downloaded from HCL Software:
1. Login to my.hcltechsw.com/downloads:
- web browser --> ddd --> my.hcltechsw.com/downloads
- Enter Username (email)
- Enter Password
2. Download Domino Container Image:
- Domino (icon) --> Version, e.g. 14.0 --> Choose the containerized image option (separated from rest of list at the bottom), e.g. Domino_14.0_ContainerImage.tgz
Note:
- This is not an export image file, but a backup time, use podman load, or docker load with these types of images.
3. Transfer to VM Container Host Using SCP/FileZilla
Note:
- Assuming transferred to user Downloads folder
e.g. ~/Downloads/Domino_14.0_ContainerImage.tgz
4. Load the Image:
a. Load the image:
$ podman load --input ~/Downloads/Domino_14.0_ContainerImage.tgz
<watch the Copying blob .... confirm they indicate done when complete. Confirm final line says: Loaded image: localhost/domino-container:14.0>
Notes:
- This is a large image, and there is no progress bar. It will take a minute or so.
- For docker, use docker load ...
b. Confirm the image is loaded:
$ podman image list
<confirm output>
e.g.
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/domino-container 14.0 09ae32e0125d 2 months ago 1.58 GB
Important:
- Note the IMAGE ID, e.g. 09ae32e0125d, we will use it later with the podman push.
Part B: Push to OKD/OCP 4 Local Registry:
1. Create an ImageStream:
- Login:
$ oc login -u <accountid>
<enter password>
- Create project (namespace):
$ oc new-project domino
<confirm created, should auto switch to new project>
- Create ImageStream YAML file:
$ vi ~/dom140is.yaml
kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
name: dom140
spec: {}
- Create the ImageStream of the new domino140 image:
$ oc create -f ~/dom140is.yaml
<confirm success>
$ oc get is
<view output, the image streams listed will now include a new domino140 entry with the local registry path>
Important:
- Note the image stream registry path/URL. We'll need this for the podman push next.
2. Use Podman to Push the image into the ImageStream:
- Login to OKD/OCP4 AP with podman and token:
$ OCPToken=$(oc whoami -t)
$ echo OCPToken
<view token>
$ OCPRegHost=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}')
$ echo OCPRegHost
<view registry host URL>
$ podman login -u bogus -p ${OCPToken} ${OCPRegHost} --tls-verify=false
<view success message: Login Succeeded!>
- Push the image into the created ImageStream:
$ podman push 09ae32e0125d $OCPRegHost/domino/dom140:latest --tls-verify=false
<view the blobs copying again, the time will be a longer/slower than the local load>
Notes:
- Reuse the IMAGE ID from above
- Reuse the OCPRegHost
- In the URL above, domino is the project/namespace, and dom140 is the name of the ImageStream specified in dom140is.yaml
- Instead of using :14.0, latest allows the image to be referenced w/o needing the version. If doing this way, this image stream will need to be re-tagged when 14.1 is added, but for now, it's latest.
- Confirm:
$ oc get is
<view output>
$ oc describe is/dom140
<view output, will have one timestamp Created, when the IS was created from the YAML file, and the image-registry.openshift-image-registry.svc:5000/.... updated more recently from the image upload.>
- Confirm in Web Console:
-> Web Console --> login --> Builds (left menu) --> ImageStreams (submenu) --> click dom140 (under Name column) --> under Tags (heading), verify dom140:latest image
Note:
- Image name: HCL Domino Image
- Summary: HCL Domino Enterprise Server
previous page
|