Jump to: navigation, search

Difference between revisions of "StarlingX/Developer Guide/Regional Mirror"

(Reference Mirror)
(User Access)
 
(11 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
Regional mirror will give us a Reference Mirror that can use to avoid downloading all packages from the Internet
 
Regional mirror will give us a Reference Mirror that can use to avoid downloading all packages from the Internet
  
===Reference Mirror===
+
=== Reference Mirror ===
  
Our Regional Office needs to create a Base Mirror which will perform a regular (daily?) automated download using existing methods. Call these Reference Mirror.
+
Our Regional Office needs to create a Reference Mirror which will perform a regular (daily?) automated download using existing methods.
The high level overview of activities to perform:
+
The high level overview of activities to perform in the server hosting the Reference Mirror are:
  
* Base mirror
+
* Manage user access through user authentication, e.g. SSH key.
* User access
+
* Create the base mirror directory. e.g. using existing stx-tools scripts.
 +
* Create automated updates based on new packages from mirror download process.
 +
* Enable your preferred protocol for user to transfer and synchronize with the Reference Mirror e.g. rsync.
  
====Base Mirror====
+
=== User Access ===
Mirror based on daily
 
  
====General Access====
+
1. Authenticate to the reference mirror server, e.g. upload your SSH key. <br>
 +
2. Go to your local path to host your local mirror directory:
  
# Create a Reference Mirror path
 
# Allow users to access the Reference Mirror path
 
 
====General Access====
 
 
Upload your public key to your Reference Mirror server. <br>
 
 
Create your regional mirror directory
 
 
<pre><nowiki>
 
<pre><nowiki>
user@workstation:~ $ mkdir ~/starlingx/mirror/regional/pike
+
user@workstation:~$ cd ~/starlingx/mirror/CentOS/stx-r1/CentOS/pike/
 
</nowiki></pre>
 
</nowiki></pre>
  
Rsyncing it
+
3. Synchronize your local mirror with the reference mirror e.g. rsync:
  
 
<pre><nowiki>
 
<pre><nowiki>
user@workstation:~$ cd ~/starlingx/mirror/regional/pike
+
user@workstation:~/starlingx/mirror/CentOS/stx-r1/CentOS/pike$ rsync -e "ssh -i /home/user/.ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -avF mirror@myserver.com:/mirror/mirror/ .
user@workstation:~/starlingx/mirror/regional/pike$ rsync -e "ssh -i /home/user/.ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -avF mirror@starlingx-hub.zpn.intel.com:/mirror/mirror/ .
 
</nowiki></pre>
 
 
 
<pre><nowiki>
 
user@workstation:~/starlingx/mirror/regional/pike$ cp -r /home/user/starlingx/mirror/CentOS/tis-installer .
 
 
</nowiki></pre>
 
</nowiki></pre>
  
Line 45: Line 34:
 
.
 
.
 
├── Binary
 
├── Binary
├── check.lst
 
 
├── downloads
 
├── downloads
├── Source
+
└── Source
└── tarballs.md5
 
  
4 directories, 2 files
+
3 directories
 
</nowiki></pre>
 
</nowiki></pre>
 
Updating your references into the build container
 

Latest revision as of 18:28, 11 October 2018

Regional Mirror

Regional mirror will give us a Reference Mirror that can use to avoid downloading all packages from the Internet

Reference Mirror

Our Regional Office needs to create a Reference Mirror which will perform a regular (daily?) automated download using existing methods. The high level overview of activities to perform in the server hosting the Reference Mirror are:

  • Manage user access through user authentication, e.g. SSH key.
  • Create the base mirror directory. e.g. using existing stx-tools scripts.
  • Create automated updates based on new packages from mirror download process.
  • Enable your preferred protocol for user to transfer and synchronize with the Reference Mirror e.g. rsync.

User Access

1. Authenticate to the reference mirror server, e.g. upload your SSH key.
2. Go to your local path to host your local mirror directory:

user@workstation:~$ cd ~/starlingx/mirror/CentOS/stx-r1/CentOS/pike/

3. Synchronize your local mirror with the reference mirror e.g. rsync:

user@workstation:~/starlingx/mirror/CentOS/stx-r1/CentOS/pike$ rsync -e "ssh -i /home/user/.ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -avF mirror@myserver.com:/mirror/mirror/ .

Once completed the directory structure should look like:

user@workstation:~/starlingx/mirror/regional/pike$ tree -L 1 .
.
├── Binary
├── downloads
└── Source

3 directories