| 1 | [[PageOutline]] |
| 2 | |
| 3 | = Upgrading MyPLC and SFA = |
| 4 | This page provides general instructions for upgrading a MyPLC aggregate running the SFA aggregate manager software in the GENI mesoscale deployment. |
| 5 | |
| 6 | = Variables = |
| 7 | == <distro> == |
| 8 | === Description === |
| 9 | Abbreviation of the Linux distribution that is running on the MyPLC machine |
| 10 | === Possible Values === |
| 11 | * f8 |
| 12 | * f12 |
| 13 | |
| 14 | == <arch> == |
| 15 | === Description === |
| 16 | Architecture of the machine that is running MyPLC |
| 17 | === Possible Values === |
| 18 | * i386 |
| 19 | * x86_64 |
| 20 | |
| 21 | == <baseurl> == |
| 22 | === Description === |
| 23 | URL of MyPLC repository, follows the form http://build.planet-lab.org/planetlab/<distro>/pl-<distro>-<arch>-5.0-k32-rc-20/RPMS/ |
| 24 | === Possible Values === |
| 25 | * http://build.planet-lab.org/planetlab/f8/pl-f8-i386-5.0-k32-rc-20/RPMS/ |
| 26 | * http://build.planet-lab.org/planetlab/f12/pl-f12-i386-5.0-k32-rc-20/RPMS/ |
| 27 | * http://build.planet-lab.org/planetlab/f8/pl-f8-x86_64-5.0-k32-rc-20/RPMS/ |
| 28 | * http://build.planet-lab.org/planetlab/f12/pl-f12-x86_64-5.0-k32-rc-20/RPMS/ |
| 29 | |
| 30 | = Requirements = |
| 31 | If you find that your systems do not meet the requirements below, or if you are unable to determine if you met the requirements, please contact gpo-infra@geni.net. |
| 32 | |
| 33 | == Linux Distribution == |
| 34 | This page assumes that you are running your MyPLC machine on either Fedora 12 or Fedora 8. |
| 35 | |
| 36 | == MyPLC Software == |
| 37 | This page assumes that you are at running at least a MyPLC version 5.0 release candidate. To verify this, run the following command: |
| 38 | {{{ |
| 39 | grep myplc /etc/myplc-release |
| 40 | }}} |
| 41 | |
| 42 | look for output similar to the following: |
| 43 | {{{ |
| 44 | myplc :: version=5.0 release=9.planetlab |
| 45 | }}} |
| 46 | |
| 47 | The version number being at 5.0 is the important part here. |
| 48 | |
| 49 | == SFA Software == |
| 50 | This page assumes that you are running the sfa-geni-gec9 git-tagged version of SFA. This was likely installed from source. If you haven't explicitly upgraded your SFA version after GEC 11, then you probably are running this version. |
| 51 | |
| 52 | = Upgrade Procedure = |
| 53 | == Backups (Optional) == |
| 54 | If you have some backup procedure that you would like to follow, do so now. This might be as simple as taking a snapshot of your MyPLC machine. |
| 55 | |
| 56 | == Upgrading MyPLC == |
| 57 | These instructions are modified from the MyPLC User Guide (https://svn.planet-lab.org/wiki/MyPLCUserGuide#Upgradingtoamorerecentversion) |
| 58 | |
| 59 | You will need to upgrade your MyPLC to MyPLC 5.0 rc20.: |
| 60 | 1. Modify your `/etc/yum.repos.d/myplc.repo` to have the following contents: |
| 61 | |
| 62 | {{{ |
| 63 | [myplc] |
| 64 | name= MyPLC |
| 65 | baseurl=<baseurl> |
| 66 | enabled=1 |
| 67 | gpgcheck=0 |
| 68 | }}} |
| 69 | |
| 70 | 2. Shut down the plc service |
| 71 | {{{ |
| 72 | sudo service plc stop |
| 73 | }}} |
| 74 | |
| 75 | 3. Update to packages in the MyPLC rc20 repo: |
| 76 | {{{ |
| 77 | sudo yum clean all |
| 78 | sudo yum update |
| 79 | }}} |
| 80 | |
| 81 | 4. Start the plc service again: |
| 82 | {{{ |
| 83 | sudo service plc start |
| 84 | }}} |
| 85 | |
| 86 | 5. Make a copy of the new `plnet.py` on your MyPLC machine in your home directory |
| 87 | * Note that the path for this depends on your python version on your MyPLC host |
| 88 | * The command will look ''similar'' to the following: |
| 89 | {{{ |
| 90 | cp /usr/lib/python2.5/site-packages/plnet.py ~/ |
| 91 | }}} |
| 92 | |
| 93 | 6. Patch the new `plnet.py` file |
| 94 | * A patch file was included in an email from the GPO |
| 95 | * If you do not have the correct patch file, then please email gpo-infra@geni.net and ask about the patch file for the MyPLC SFA upgrade |
| 96 | {{{ |
| 97 | patch ~/plnet.py < myplc-rc20-plnet.patch |
| 98 | }}} |
| 99 | |
| 100 | == Upgrading MyPLC-based !PlanetLab Nodes == |
| 101 | 1. Reboot the node |
| 102 | * This will pick up a new kernel on the node |
| 103 | * Note that if you have problems with this the node coming back up, restarting the plc service on the MyPLC machine may help: |
| 104 | {{{ |
| 105 | sudo service plc restart |
| 106 | }}} |
| 107 | |
| 108 | 2. Copy the newly patched `plnet.py` file from your MyPLC machine to each of the nodes |
| 109 | * Note that the path for this depends on your python version on your nodes |
| 110 | * The command will look ''similar'' to the following: |
| 111 | {{{ |
| 112 | scp ~/plnet.py node.fqdn.tld:/usr/lib/python2.5/site-packages/plnet.py |
| 113 | }}} |
| 114 | |
| 115 | 3. From each node, manually restart !NodeManager: |
| 116 | {{{ |
| 117 | sudo service nm restart |
| 118 | }}} |
| 119 | |
| 120 | == Upgrading SFA == |
| 121 | These instructions are modified from the GPO's MyPLC Reference Implementation page (http://groups.geni.net/geni/wiki/GpoLab/MyplcReferenceImplementation#AddingSFAtoMyPLC) |
| 122 | |
| 123 | 1. Prepare to Upgrade SFA |
| 124 | {{{ |
| 125 | sudo service sfa stop |
| 126 | sudo sfa-nuke-plc.py |
| 127 | ls /etc/sfa/trusted_roots > ~/trusted_roots.txt |
| 128 | sudo rm /etc/sfa/trusted_roots/* |
| 129 | sudo rm -rf /var/lib/sfa/ |
| 130 | }}} |
| 131 | |
| 132 | 2. Obtain a tarball of the sfa-1.0-35-PATCHED code and store it in your home directory on your MyPLC machine: |
| 133 | {{{ |
| 134 | wget -O ~/sfa-1.0-35-PATCHED.tar.gz https://svn.planet-lab.org/raw-attachment/wiki/SFA-1.0-35-PATCHED/sfa-1.0-35-PATCHED.tar.gz |
| 135 | }}} |
| 136 | |
| 137 | 3. Ensure SFA prerequisites are installed: |
| 138 | {{{ |
| 139 | sudo yum update fedora-release |
| 140 | sudo yum install m2crypto python-dateutil python-psycopg2 myplc-config pyOpenSSL python-ZSI libxslt-python xmlsec1-openssl-devel python-lxml |
| 141 | sudo yum upgrade pyOpenSSL python-lxml |
| 142 | }}} |
| 143 | |
| 144 | 4. Compile SFA code on the MyPLC machine |
| 145 | {{{ |
| 146 | mkdir ~/src |
| 147 | cd ~/src |
| 148 | tar xvzf ~/sfa-1.0-35-PATCHED.tar.gz |
| 149 | cd sfa-1.0-35 |
| 150 | make |
| 151 | }}} |
| 152 | |
| 153 | 5. Install SFA: |
| 154 | {{{ |
| 155 | sudo make install |
| 156 | }}} |
| 157 | |
| 158 | 6. Initialize SFA |
| 159 | {{{ |
| 160 | sudo service sfa reload |
| 161 | }}} |
| 162 | |
| 163 | 7. Trust pgeni (and any other Slice Authorities listed in `~/trusted_roots.txt`) as a remote slice authority |
| 164 | * Note that all cert files must have a .gid extension for this release of SFA (i.e. .crt and .pem files will be ignored) |
| 165 | * Download the cert files to the MyPLC machine, and save it under `/etc/sfa/trusted_roots/` |
| 166 | * Here's an example of how to do this for pgeni: |
| 167 | {{{ |
| 168 | wget -O ~/pgeni.gpolab.bbn.com.gid http://www.pgeni.gpolab.bbn.com/ca-cert/pgeni.gpolab.bbn.com.pem |
| 169 | sudo cp ~/pgeni.gpolab.bbn.com.gid /etc/sfa/trusted_roots/ |
| 170 | }}} |
| 171 | |
| 172 | 8. Import PLC database into SFA: |
| 173 | {{{ |
| 174 | sudo sfa-import-plc.py |
| 175 | }}} |
| 176 | |
| 177 | 9. Configure the maximum sliver renewal time |
| 178 | * This value is a configurable parameter for how long a user can renew a sliver on your aggregate |
| 179 | * You can set this value to be whatever you want |
| 180 | * At the GPO, we have set this value to 180 days |
| 181 | * The default value is 60 days |
| 182 | * The process to do this is as follows: |
| 183 | {{{ |
| 184 | [user@myplc:~]$sudo sfa-config-tty |
| 185 | Enter command (u for usual changes, w to save, ? for help) e SFA_MAX_SLICE_RENEW |
| 186 | == SFA_MAX_SLICE_RENEW : [60] 180 |
| 187 | Enter command (u for usual changes, w to save, ? for help) w |
| 188 | Wrote /etc/sfa/configs/site.xml |
| 189 | Merged |
| 190 | /etc/sfa/default_config.xml |
| 191 | and /etc/sfa/configs/site.xml |
| 192 | into /etc/sfa/sfa_config.xml |
| 193 | You might want to type 'r' (restart sfa), 'R' (reload sfa) or 'q' (quit) |
| 194 | Enter command (u for usual changes, w to save, ? for help) q |
| 195 | }}} |
| 196 | 10. Start SFA |
| 197 | {{{ |
| 198 | sudo service sfa restart |
| 199 | }}} |
| 200 | 11. Restart all MyPLC-based Planet Lab nodes one last time |