DUG01337 MOP Install Docker CIR Linux Rev1.2
DUG01337 MOP Install Docker CIR Linux Rev1.2
R E G I S TR Y ) S E RVER I NS T AL L A T I ON
A ND C O NFI GU RA T I ON
Method of Procedure
Document Part Number: DUG01337
Document Revision: 1.2
Published: November 2021
i
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
TABLE OF CONTENTS
Document Information ................................................................................................... 1
Revision History ...................................................................................................................... 1
About This Document ..................................................................................................... 2
1.1 Purpose...................................................................................................................... 2
1.2 Intended Audience .................................................................................................... 2
2 Introduction to Docker CIR ............................................................................................. 3
3 Verifying Docker CIR Prerequisites................................................................................. 4
3.1 Hardware ................................................................................................................... 4
3.2 Software .................................................................................................................... 4
3.3 Network Ports ............................................................................................................ 5
4 Docker Installation .......................................................................................................... 6
4.1 Online Installation...................................................................................................... 6
4.2 Offline Install ............................................................................................................. 6
4.3 Managing Docker Service .......................................................................................... 7
5 Install Docker Compose .................................................................................................. 8
5.1 Online Install .............................................................................................................. 8
5.2 Offline Install ............................................................................................................. 8
6 Configure Firewall Rules on the CIR Server ................................................................... 9
7 Configure HTTPS Access to the Docker CIR Server ...................................................... 10
7.1 Generate a Certificate Authority Certificate ............................................................ 10
7.2 Generating a Server Certificate ............................................................................... 10
7.3 Provide Certificates to Docker ................................................................................. 12
8 Preparing Docker CIR Server ........................................................................................ 13
8.1 Online Installation.................................................................................................... 13
8.2 Offline Installation ................................................................................................... 14
A Migration from Harbor ................................................................................................. 15
B Docker CIR CLI Commands ........................................................................................... 16
Acronyms, Abbreviations, and Definitions .................................................................. 19
Customer Service Help Desk......................................................................................... 20
Airspan Encourages Comments ................................................................................... 20
ii
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
FIGURES
Figure 1: Workflow for Installing CIR on Linux ......................................................................................... 3
TABLES
Table 1. Hardware Configuration - LAB ................................................................................................... 4
Table 2. Hardware Configuration - Commercial ...................................................................................... 4
Table 3. Software Versions ...................................................................................................................... 4
Table 4. Ports........................................................................................................................................... 5
Table 5: Acronyms, Abbreviations, and Definitions ............................................................................... 19
iii
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
Document Information
Revision History
Revision Date Summary of Changes Created by
Removed ‘$’ from all the commands
Updated the note in Generate a Certificate Authority Certificate
Rev 1.2 November 2021 Updated Online Installation MVDB, BG
Updated Offline Installation
Updated B Docker CIR CLI Commands
Rev 1.1 November 2021 Updated Online Install MVDB, BG
Rev 1.0 October 2021 A new document to create and install Docker CIR on Linux. MVDB, BG
1
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
1.1 Purpose
This MOP provides the procedure for installing Docker CIR on Linux.
2
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
3
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
3.1 Hardware
The following table lists the recommended hardware configurations for deploying Docker CIR in a LAB
environment.
Resource Recommended
CPU 4 CPU/vCPU cores
Memory 8 GB
Disk 100 GB
Network Interface 1 Gbps
The following table lists the recommended hardware configurations for deploying Docker CIR in a
commercial environment.
Resource Recommended
CPU 12 CPU/vCPU cores
Memory 32 GB
Disk 500 GB
Network Interface 2 Gbps (Interface Bonding/Link Aggregation)
3.2 Software
The following table lists the software versions that must be installed on the target host.
4
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
Table 4. Ports
CIR portal and core API accepts HTTPS requests on this port. You
443 HTTPS
can change this port in the configuration file.
Used for secure FTP for transfer of Docker images between CIR
22 SFTP
and gNodeB.
5
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
4 Docker Installation
It is recommended to use online installation to receive the latest software required for Docker and
Docker Compose installations. Where online installation is not possible, follow the instructions in this
guide for offline installation.
Replace <Linux-OS> below, with the Linux OS type used for the Docker CIR Server. Either
centos or rhel is accepted.
Where required, the Docker offline package bundle for the associated CentOS/RHEL
Linux OS and version can be provided.
From the /home/<user>/downloads folder, execute the following commands to install the required
Docker software.
6
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
You can manage the daemons like any other services on your system. Use systemctl stop if you want
to temporarily stop Docker and free up system resources used by your containers. You can restart the
service with systemctl start.
To ensure that the services automatically run at server startup, run the following command.
7
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
The version used below was the latest stable release at the time of document creation.
1. This command will download the right binary for your system and drop it into /usr/bin.
curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-
compose-`uname -s`-`uname -m` > ~/docker-compose
chmod +x ~/docker-compose
sudo mv ~/docker-compose /usr/bin/docker-compose
docker-compose --version
docker-compose --version
8
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
9
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
mkdir -p ~/{workspace/sslca,registry/{auth,nginx/{conf.d,ssl}}}
sudo mkdir -p /etc/docker/certs.d/<hostname.domain-name.com>/
sudo mkdir -p /usr/share/ca-certificates/extra/
cd ~/workspace/sslca
openssl genrsa -out ca.key 4096
3. Generate the CA certificate. If you use an FQDN to connect your Docker CIR host, you must
specify it as the CN attribute.
4. Generating self-signed certificates:
openssl req -x509 -new -nodes -sha512 -days 3650 -subj "/CN=<hostname.domain-
name.com>" -key ca.key -out ca.crt
2. Generate a CSR. Adapt the values in the -subj option to reflect your organization. If you use
an FQDN to connect your CIR host, you must specify it as the CN attribute and use it in the key
and CSR filenames.
3. Generating the certificate signing request.
10
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
basicConstraints=CA:FALSE
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
[alt_names]
DNS.1=<hostname.domain-name.com>
DNS.2=<hostname>
EOF
6. Use the v3.ext file to generate a certificate for your CIR host.
7. Replace the <hostname.domain-name.com> in the CSR and CRT file names.
openssl x509 -req -sha512 -days 3650 -extfile v3.ext -CA ca.crt -CAkey ca.key -
CAcreateserial -in <hostname.domain-name.com>.csr -out <hostname.domain-
name.com>.crt
11
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
cp <hostname.domain-name.com>.key ~/registry/nginx/ssl/
cp <hostname.domain-name.com>.crt ~/registry/nginx/ssl/
2. Copy the server certificate, key, and CA files into the Docker certificates folder on the CIR host.
4. Restart Docker.
12
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
For Online Installation, Airspan will provide the required files for this section.
cd ~/registry
2. Copy the provided online docker-compose.yaml configuration file to the directory in step 1.
3. Change the directory and request a new password file named registry.passwd for your Docker
CIR user (example - admin). Enter a user password and re-type it to confirm.
Take note of the username and password created for later login to docker.
cd ~/registry/nginx/conf.d
5. Copy the provided online registry.conf Nginx configuration file to the directory in step 4.
6. Edit the registry.conf file, and replace the three references of <hostname.domain-
name.com> with the applicable FQDN information. See example of the three references
below.
server {
server_name <hostname.domain-name.com>;
client_max_body_size 2000M;
ssl_certificate /etc/nginx/ssl/<hostname.domain-name.com>.crt;
ssl_certificate_key /etc/nginx/ssl/<hostname.domain-name.com>.key;
cd ~/registry/
docker-compose up -d
13
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
For Offline Installation, Airspan will provide the required images and files for this section.
cd ~/registry
2. Copy the provided Docker images and the offline docker-compose.yaml configuration file to
the directory in step 1.
3. Execute the commands below to load the images.
4. Change the directory and request a new password file named registry.passwd for your Docker
CIR user (example = admin). Enter a user password and re-type it to confirm.
Take note of the username and password created for later login to docker.
cd ~/registry/nginx/conf.d
6. Copy the provided online registry.conf Nginx configuration file to the directory in step 5.
7. Edit the registry.conf file, and replace the three references of <hostname.domain-
name.com> with the applicable FQDN information. See example of the three references
below.
server {
server_name <hostname.domain-name.com>;
client_max_body_size 2000M;
ssl_certificate /etc/nginx/ssl/<hostname.domain-name.com>.crt;
ssl_certificate_key /etc/nginx/ssl/<hostname.domain-name.com>.key;
cd ~/registry/
docker-compose up -d
14
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
cd /your/harbor/installation/files
docker-compose down -v
2. Backup Harbor’s current files so that you can roll back to the current version if necessary.
mkdir -p ~/{workspace/sslca,registry/{auth,nginx/{conf.d,ssl}}}
sudo mkdir -p /usr/share/ca-certificates/extra/
cp ca.key ~/workspace/sslca
cp ca.crt ~/workspace/sslca
cp <hostname.domain-name.com>.key ~/workspace/sslca
cp <hostname.domain-name.com>.cert ~/workspace/sslca
cp <hostname.domain-name.com>.crt ~/workspace/sslca
cp <hostname.domain-name.com>.csr ~/workspace/sslca
cp ca.srl ~/workspace/sslca
cp v3.ext ~/workspace/sslca
cp <hostname.domain-name.com>.key ~/registry/nginx/ssl/
cp <hostname.domain-name.com>.crt ~/registry/nginx/ssl/
sudo cp ca.crt /usr/share/ca-certificates/extra/
15
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
All of the tasks listed in this section should be performed using the ACP GUI, therefore
the commands shown are for reference purposes only.
Before running the commands in this section, it is required to login to the Docker CIR using the
following:
…..
Loaded image: airspan_cuup_app_x86:airspan_airstrand2200_19.00-31-0.0
o where:
image name: airspan_cuup_app_x86.
image tag: airspan_airstrand2200_19.00-31-0.0.
image version: 19.00-31-0.0.
16
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
airspan_cuup_app_x86 with
airspan_cucp_app_x86
airspan_du_l2s6_x86
airspan_ru
Execute the following to view the list of versions available for specific images in the CIR:
17
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
2. Copy the ‘marking manifest’ of your image (noting the version), then execute:
The deletion will only remove the blobs of the image. Image name will still be listed
when querying the CIR catalog (please refer to: List CIR Images).
18
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
Term Description
19
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021
Docker CIR (Container Image Registry) Server Installation and Configuration
Method of Procedure
20
© Copyright Airspan Networks Ltd., 2021 P/N: DUG01337 Rev. 1.2, Nov 2021