Difference between revisions of "QuantaStor Local Update Mirror"

From OSNEXUS Online Documentation Site
Jump to: navigation, search
(Created page with "Follow the steps below to create a local mirror of the OSNEXUS QuantaSTor update repository 1. Contact support@osnexus.com to request that your SSH public key be added to the...")
 
m
Line 1: Line 1:
Follow the steps below to create a local mirror of the OSNEXUS QuantaSTor update repository
+
Follow the steps below to create a local mirror of the OSNEXUS QuantaStor update repository.
  
 
1. Contact support@osnexus.com to request that your SSH public key be added to the OSNEXUS QuantaStor replication mirror for rsync access. Support can also assist with the below process and any questions you may have.
 
1. Contact support@osnexus.com to request that your SSH public key be added to the OSNEXUS QuantaStor replication mirror for rsync access. Support can also assist with the below process and any questions you may have.
Line 5: Line 5:
 
2. Setup a Linux VM with a web server, below is an example config file using nginx on Ubuntu 18.04 or newer:
 
2. Setup a Linux VM with a web server, below is an example config file using nginx on Ubuntu 18.04 or newer:
  
Edit the /etc/nginx/sites-enabled/osnexus-mirror file. (note the file may be different depending on your nginx version or Linux OS.)
+
Edit the /etc/nginx/sites-enabled/osnexus-mirror file. '''Please note. The file may be different depending on your nginx version or Linux OS. '''
 +
 
 +
'''Replace''' yourserver.example.net with your web server DNS FQDN.
  
REPLACE yourserver.example.net with your web servers DNS mapping.
 
 
<pre>
 
<pre>
  
Line 46: Line 47:
 
</pre>
 
</pre>
  
6. add your new local mirror to your QuantaStor systems for all updates:
+
6. Add your new local mirror to your QuantaStor systems for all updates:
  
REPLACE yourserver.example.net with your web servers DNS mapping.
+
'''Replace''' yourserver.example.net with your web server DNS FQDN.
  
 
<pre>
 
<pre>
 
echo 'deb http://yourserver.example.net/packages quantastor-bionic main' > /etc/apt/sources.list.d/osnexus.list
 
echo 'deb http://yourserver.example.net/packages quantastor-bionic main' > /etc/apt/sources.list.d/osnexus.list
 
</pre>
 
</pre>

Revision as of 04:16, 14 October 2021

Follow the steps below to create a local mirror of the OSNEXUS QuantaStor update repository.

1. Contact support@osnexus.com to request that your SSH public key be added to the OSNEXUS QuantaStor replication mirror for rsync access. Support can also assist with the below process and any questions you may have.

2. Setup a Linux VM with a web server, below is an example config file using nginx on Ubuntu 18.04 or newer:

Edit the /etc/nginx/sites-enabled/osnexus-mirror file. Please note. The file may be different depending on your nginx version or Linux OS.

Replace yourserver.example.net with your web server DNS FQDN.


#
# A virtual host entry for an OSNEXUS QuantaStor mirror
#

server {
    listen       80;
    server_name  yourserver.example.net packages;
    location / {
        root /var/lib/www/packages-root;
        autoindex on;
    }
}

Now restart and ensure it is enabled to startup automatically.

systemctl enable nginx
systemctl restart nginx

3. ensure your ssh key is available for the root user as the id_rsa file under /root/.ssh/

4. Run an initial rsync to synchronize the QuantaStor update repo using the credentials and SSH key setup with the OSNEXUS support team in step 1.

rsync -aPv rsync://YOURUSER@pkgmirror.osnexus.com/packages /var/lib/www/packages-root/

5. Add a cron entry that will run every day to synchronize your local mirror with the QuantaStor repo. Note that this requires ssh access from your mirror server to pkgmirror.osnexus.com

edit the /etc/cron.d/osnexus-mirror-sync file and add the below contents:
0 02 * * * root /usr/bin/rsync -aPv rsync://YOURUSER@pkgmirror.osnexus.com/packages /var/lib/www/packages-root/

6. Add your new local mirror to your QuantaStor systems for all updates:

Replace yourserver.example.net with your web server DNS FQDN.

echo 'deb http://yourserver.example.net/packages quantastor-bionic main' > /etc/apt/sources.list.d/osnexus.list