QuantaStor Local Update Mirror

From OSNEXUS Online Documentation Site
Jump to: navigation, search

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

If you need any further assistance, please contact support@osnexus.com.