<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mustafa Challawala</title>
    <description>The latest articles on DEV Community by Mustafa Challawala (@mustafaops).</description>
    <link>https://dev.to/mustafaops</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F299125%2F40c69037-a3fa-4335-b38b-be8eeba7203b.jpg</url>
      <title>DEV Community: Mustafa Challawala</title>
      <link>https://dev.to/mustafaops</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mustafaops"/>
    <language>en</language>
    <item>
      <title>How to Deploy your own Container Registry </title>
      <dc:creator>Mustafa Challawala</dc:creator>
      <pubDate>Sat, 11 Jan 2020 04:40:04 +0000</pubDate>
      <link>https://dev.to/mustafaops/how-to-deploy-your-own-container-regitory-4jbl</link>
      <guid>https://dev.to/mustafaops/how-to-deploy-your-own-container-regitory-4jbl</guid>
      <description>&lt;p&gt;Harbor is an open source trusted cloud native registry project that stores, signs, and scans content. Harbor extends the open source Docker Distribution by adding the functionalities usually required by users such as security, identity and management. Having a registry closer to the build and run environment can improve the image transfer efficiency. Harbor supports replication of images between registries, and also offers advanced security features such as user management, access control and activity auditing.&lt;/p&gt;

&lt;p&gt;To learn more about Harbor just Visit: &lt;a href="https://github.com/goharbor/harbor"&gt;https://github.com/goharbor/harbor&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  -- Deployment Prerequisites for the Target Host
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Hardware
&lt;/h2&gt;

&lt;p&gt;The following table lists the minimum and recommended hardware configurations for deploying Harbor.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resource | Minimum   | Recommended
&lt;/h3&gt;

&lt;p&gt;CPU         | 2 CPU         | 4 CPU&lt;br&gt;
Memory          | 4 GB          | 8 GB&lt;br&gt;
Disk            | 40 GB         | 160 GB&lt;/p&gt;

&lt;h2&gt;
  
  
  Software
&lt;/h2&gt;

&lt;p&gt;The following table lists the software versions that must be installed on the target host.&lt;/p&gt;

&lt;h3&gt;
  
  
  Software | Version                   |       Description
&lt;/h3&gt;

&lt;p&gt;Docker engine   | version 17.06.0-ce+ or higher | For installation instructions, see docker engine doc&lt;br&gt;
Docker Compose  | version 1.18.0 or higher  | For installation instructions, see docker compose doc&lt;br&gt;
Openssl         | latest                        |is preferred   Used to generate certificate and keys for Harbor&lt;/p&gt;

&lt;h2&gt;
  
  
  Network ports
&lt;/h2&gt;

&lt;p&gt;Harbor requires that the following ports be open on the target host.&lt;/p&gt;

&lt;h3&gt;
  
  
  Port  | Protocol |   Description
&lt;/h3&gt;

&lt;p&gt;443  | HTTPS    |   Harbor portal and core API accept HTTPS requests on this port. You can change this port in the configuration file.&lt;br&gt;
4443     | HTTPS    |   Connections to the Docker Content Trust service for Harbor. Only required if Notary is enabled. You can change this port in the configuration file.&lt;br&gt;
80   | HTTP         |   Harbor portal and core API accept HTTP requests on this port. You can change this port in the configuration file.&lt;/p&gt;

&lt;h1&gt;
  
  
  -- Installation Procedure
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Download and Unpack the Installer&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to the Harbor releases page (&lt;a href="https://github.com/goharbor/harbor/releases"&gt;https://github.com/goharbor/harbor/releases&lt;/a&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download either the online or offline installer for the version you want to install&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use tar to extract the installer package:&lt;/p&gt;

&lt;p&gt;Online installer:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash $ tar xvf harbor-online-installer-version.tgz
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Offline installer:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash $ tar xvf harbor-offline-installer-version.tgz
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Configure the harbor.yml file.&lt;br&gt;
     hostname: hostname.com&lt;br&gt;
 http:&lt;br&gt;
 port: 80&lt;br&gt;
 harbor_admin_password: password&lt;br&gt;
 database:&lt;br&gt;
 password: password&lt;br&gt;
 data_volume: /data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Installation with Clair, and Chart Repository Service&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash  $ sudo ./install.sh --with-clair --with-chartmuseum
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Notes: &lt;br&gt;
     Managing Harbor Lifecycle&lt;br&gt;
Stop Harbor:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash $ sudo docker-compose stop

 Stopping nginx              ... done
 Stopping harbor-portal      ... done
 Stopping harbor-jobservice  ... done
 Stopping harbor-core        ... done   
 Stopping registry           ... done
 Stopping redis              ... done
 Stopping registryctl        ... done
 Stopping harbor-db          ... done
 Stopping harbor-log         ... done
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Restart Harbor after Stopping:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash $ sudo docker-compose start

 Starting log         ... done
 Starting registry    ... done
 Starting registryctl ... done
 Starting postgresql  ... done
 Starting core        ... done
 Starting portal      ... done
 Starting redis       ... done
 Starting jobservice  ... done
 Starting proxy       ... done
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Reconfigure Harbor&lt;/p&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash $ sudo docker-compose down -v&lt;br&gt;
bash $ vim harbor.yml&lt;br&gt;
bash $ sudo prepare --with-clair --with-chartmuseum&lt;br&gt;
bash $ sudo docker-compose up -d&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h1&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  How to Access harbor-registry to Client machine&lt;br&gt;
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Add registry to insecure registries&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash $ sudo echo "{"insecure-registries":["hostname.com"]}" &amp;gt; /etc/docker/daemon.json
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restart docker service&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash $ sudo service docker restart
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Login to harbor registry&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash $ sudo docker login http://hostname.com
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Reference Link: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/goharbor/harbor/blob/master/docs/installation_guide.md"&gt;https://github.com/goharbor/harbor/blob/master/docs/installation_guide.md&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>kubernetes</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
