wiki:Internal/Myplc/InstallMyplc

My PLC installation for Orbit

Relevant Infomation

Installation documented at here.

MyPLC Varibles

<base_os>Fedora 12
<myplc_distribution> planetlab-f12-i386-5.0
<myplc_baseurl>http://build.planet-lab.org/planetlab/f12/pl-f12-x86_64-5.0-k32-rc-20/RPMS/
<myplc_root_user>root
PLC_ROOT_USERroot@…
PLC_ROOT_PASSWORD0r1b1TPLC
<myplc_root_password>0r1b1TPLC
<myplc_support_email>plc-admin@…
<myplc_host>myplc.orbit-lab.org
<myplc_dns1>165.230.183.34
<myplc_dns2>165.230.172.34
<public_site_name>myplc.orbit-lab.org
<public_site_shortname>myplc
<public_login_base>orbit
<myplc_deployment>bootstrapfs-planetlab-f12-x86_64.tar.bz2
<site_latitude>40.468133,40°28'5.28"N
<site_longitude>-74.445581,74°26'44.09"W
<sfa_git_tag>XXXXX Pls. check what is the latest SFA git tag

VM information

VM MAC 00:11:22:EE:EE:09
VM FQDNmyplc.orbit-lab.org
VM IP10.50.0.67
Vnc COnsole External3:9
VM img location /root/vm_imv/myplc.img
VM start up script /root/start_myplc
Host VNC port# 5900
Host Machine external3
root pw hint mob…
primary user native
primary userpasswd hint nat…
myplc_root_password0r1b1TPLC
PLC_DB_PASSWORDeecea785-291f-4188-96b5-dfbb0e0b0a1b

In this document we outline the process for installing the Myplc controller on a Fedora 8 VM. I'm essentially following the instructions from: this page.

Step 0

Populate the "varibles" table with values.

Step 1

We install Fedora 8 on a vm by booting the vm with an install iso. The general instructions are detailed here (see the section on building a client). The main diffrence is that we use the Fedora 8 install iso, instead of ubuntu. The commands I ran as root out of the /root directory on external3 were:

wget http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/8/Fedora/x86_64/iso/Fedora-8-x86_64-DVD.iso
./install_vm ./vm_img/fedora_server.img ./Fedora-8-x86_64-DVD.iso
...
./start_vm ./vm_img/fedora8.img 1

Where … is this process:

  • connect to the vnc session on external3:5900 (you will need a vnc client and possibly and ssh tunnel)
  • use the fedora to install the

OS mostly this is all defaulted. We even let it do the partitioning, it sets up lvm. The only departures from the defaults were:

  • Skipped the CD check (Purely for convenience)
  • set the root password to ….
  • set the default user to native/….
  • Completely disable the firewall (there are notes in the Myplc documentation about enabling specific firewall ports)
  • Completely disable SElinux features. (Myplc requires this as a step in the installation process)
  • Power down (don't reboot, as we'll want to start the vm back up with out the install iso, the step immediately following this process.)

Once this is done the fedora system should be operational and through the vnc session (now at external3:5901) you should be able to modify settings. I opted to let it preform the 280+ updates, and then edited the sudosers list (by running visudo as root, you will have to su -) to enable the wheel group with out passwords (there was a life for this, I just uncommented it). I then added native to the wheel group, thus giving it sudo privlage. SSHD comes installed by default, so using the native/…. credentials you can ssh into this box. The current Ip given by dhcp was 10.50.250.20. This is useful since you can't copy paste into a vnc window easily. Note - by default kvm's vnc sessions don't require a password to connect, so they only "lock out" of the machine comes in the form of gdm/console login prompts.

Fedora 8 is a desktop distribution. There doesn't seem to be a server (Fedora core?) and the install instructions specify fedora8.

4/24/2012

Switching to fedora 12. Os tweaks before we start the install.

  1. added native to wheel group
    usermod -a -G wheel native
    
  2. edited sudoers to allow wheel sudo access with no password.
  3. droped udev 70.persisent.net rules so that udev would have to remake because we move the vm after installin.
  4. disabled firewall by running
    system-config-firewall
    
    Then choosing diable.
  5. Edit /etc/selinux/config (as root) to set SELINUX=disabled.

Step 2

Based on the variables from Step 0 I've modified the the repo creation rules to:

[native@localhost ~] sudo sh -c 'echo "[myplc]" > /etc/yum.repos.d/myplc.repo'
[native@localhost ~] sudo sh -c 'echo "name= MyPLC" >> /etc/yum.repos.d/myplc.repo'
[native@localhost ~] sudo sh -c 'echo "baseurl=http://build.planet-lab.org/planetlab/f8/pl-f8-i386-5.0-k32-rc-20/RPMS/" >> /etc/yum.repos.d/myplc.repo'
[native@localhost ~] sudo sh -c 'echo "enabled=1" >> /etc/yum.repos.d/myplc.repo'
[native@localhost ~] sudo sh -c 'echo "gpgcheck=0" >> /etc/yum.repos.d/myplc.repo'

Running the update gets us.

[native@localhost ~]$ sudo yum update fedora-release
myplc                                                                                                                                                                                   | 1.1 kB     00:00
myplc/primary                                                                                                                                                                           | 178 kB     00:00
myplc                                                                                                                                                                                                  101/101
Setting up Update Process
No Packages marked for Update

Finally the results of installing Myplc is a lot of screen dump and a question about if you are sure you want to install. The end results looks like:

[native@localhost ~] sudo yum install myplc
...

Installed:
  myplc.noarch 0:5.0-15.planetlab

Dependency Installed:
  OpenIPMI-tools.x86_64 0:2.0.11-3.fc8               PLCAPI.i386 0:5.0-28.planetlab                          PyXML.x86_64 0:0.8.4-8.fc8                   SOAPpy.noarch 0:0.11.6-7.fc8
  apr-devel.x86_64 0:1.2.11-2                        apr-util-devel.x86_64 0:1.2.10-2.fc8                    bootcd-initscripts.noarch 0:5.0-8.2011.02.17 bootcd-planetlab-f8-i386.noarch 0:5.0-8.2011.02.17
  bootmanager.noarch 0:5.0-16.planetlab              bootstrapfs-planetlab-f8-i386.noarch 0:2.0-9.2011.02.17 createrepo.noarch 0:0.4.11-2.fc8             cyrus-sasl-devel.x86_64 0:2.1.22-8.fc8
  db4-cxx.x86_64 0:4.6.21-3.fc8                      db4-devel.x86_64 0:4.6.21-3.fc8                         distcache.x86_64 0:1.4.5-15                  drupal.noarch 0:4.7-14.planetlab
  expat-devel.x86_64 0:2.0.1-2                       expect.x86_64 0:5.43.0-9.fc8                            httpd-devel.x86_64 0:2.2.9-1.fc8             memcached.x86_64 0:1.2.4-2.fc8
  mod_python.x86_64 0:3.3.1-5                        mod_ssl.x86_64 1:2.2.9-1.fc8                            mod_wsgi.x86_64 0:1.3-2.fc8                  monitor-runlevelagent.i386 0:3.0-35.planetlab
  mtools.x86_64 0:3.9.11-2.fc8                       mx.x86_64 0:2.0.6-3                                     myplc-config.noarch 0:5.0-15.planetlab       myplc-docs.noarch 0:5.0-15.planetlab
  myplc-release.noarch 0:5.0-15.planetlab.2011.02.17 nodeconfig.i386 0:5.0-5.planetlab                       nodeyum.noarch 0:2.0-9.2011.02.17            openldap-devel.x86_64 0:2.3.39-4.fc8
  pcucontrol.i386 0:1.0-10.planetlab                 perl-IO-Socket-SSL.noarch 0:1.18-1.fc8                  perl-Net-LibIDN.x86_64 0:0.10-1.fc8          perl-Net-SSLeay.x86_64 0:1.30-5.fc8.1
  php.x86_64 0:5.2.6-2.fc8                           php-cli.x86_64 0:5.2.6-2.fc8                            php-common.x86_64 0:5.2.6-2.fc8              php-gd.x86_64 0:5.2.6-2.fc8
  php-mbstring.x86_64 0:5.2.6-2.fc8                  php-pdo.x86_64 0:5.2.6-2.fc8                            php-pgsql.x86_64 0:5.2.6-2.fc8               plewww.noarch 0:4.3-59
  plewww-plekit.noarch 0:4.3-59                      postgresql.x86_64 0:8.2.11-1.fc8                        postgresql-libs.x86_64 0:8.2.11-1.fc8        postgresql-python.x86_64 0:8.2.11-1.fc8
  postgresql-server.x86_64 0:8.2.11-1.fc8            pyOpenSSL.x86_64 0:0.6-1.p24.9                          pyaspects.i386 0:0.4.1-1.planetlab           pypcilib.i386 0:0.2-9.planetlab
  pyplnet.noarch 0:4.3-9.planetlab                   python-devel.x86_64 0:2.5.1-26.fc8.2                    python-fpconst.noarch 0:0.7.3-3.fc8.1        python-ldap.x86_64 0:2.3.1-1.fc8
  python-memcached.noarch 0:1.39-1.fc8               python-psycopg2.x86_64 0:2.0.7-1.fc8                    python-pycurl.x86_64 0:7.16.4-1.fc8          python-simplejson.x86_64 0:1.9.1-1.fc8
  python-twisted-core.x86_64 0:2.5.0-2.fc8           python-twisted-web.x86_64 0:0.7.0-1.fc8                 python-twisted-words.x86_64 0:0.5.0-1.fc8    python-zope-interface.x86_64 0:3.0.1-8.fc8
  sendmail-cf.x86_64 0:8.14.2-1.fc8                  sharutils.x86_64 0:4.6.3-1.fc7                          syslinux.x86_64 0:3.36-7.fc8                 tcl.x86_64 1:8.4.17-1.fc8
  www-register-wizard.noarch 0:4.3-5.planetlab       xmlsec1.x86_64 0:1.2.9-8.1                              xmlsec1-openssl.x86_64 0:1.2.9-8.1

Complete!

4/24/2012

For Fedora 12 x86_64: Repo commands were changed to:

[native@localhost ~]$ sudo sh -c 'echo "[myplc]" > /etc/yum.repos.d/myplc.repo'
[native@localhost ~]$ sudo sh -c 'echo "name= MyPLC" >> /etc/yum.repos.d/myplc.repo'
[native@localhost ~]$ sudo sh -c 'echo "baseurl=http://build.planet-lab.org/planetlab/f12/pl-f12-x86_64-5.0-k32-rc-20/RPMS/" >> /etc/yum.repos.d/myplc.repo'
[native@localhost ~]$ sudo sh -c 'echo "enabled=1" >> /etc/yum.repos.d/myplc.repo'
[native@localhost ~]$ sudo sh -c 'echo "gpgcheck=0" >> /etc/yum.repos.d/myplc.repo'

[native@localhost ~]$ sudo yum update fedora-release
...
Complete!

[native@localhost ~]$ sudo yum install myplc
...
Complete!

Step 3

We are apparently taking Path A. The Answer in step 0 shape our answers to the questions posed by

[native@localhost ~] sudo plc-config-tty

Note:

  • Once the variables are set with plc-config-tty, it tells you to run service …, however service isn't installed Not sure if it's supposed to come installed by default, but I just rant /etc/init.d/plc restart
  • When they ask for the PLC_DB_PASSWORD, their shell utility requires you to prefix the varialbe name with s to get the variable value

4/24/2012

Changes for fedora 12

Enter command (u for usual changes, w to save, ? for help) u
== PLC_NAME : [PlanetLab Test] myplc.orbit-lab.org
== PLC_SHORTNAME : [Tlab] myplc
== PLC_SLICE_PREFIX : [pl] orbit
== PLC_ROOT_USER : [root@localhost.localdomain] root@myplc.orbit-lab.org
== PLC_ROOT_PASSWORD : [root] 0r1b1TPLC
== PLC_MAIL_ENABLED : [false] true
== PLC_MAIL_SUPPORT_ADDRESS : [root+support@localhost.localdomain] plc-admin@orbit-lab.org
== PLC_DB_HOST : [localhost.localdomain]
== PLC_API_HOST : [localhost.localdomain] myplc.orbit-lab.org
== PLC_WWW_HOST : [localhost.localdomain] myplc.orbit-lab.org
== PLC_BOOT_HOST : [localhost.localdomain] myplc.orbit-lab.org
== PLC_NET_DNS1 : [127.0.0.1] 10.0.0.9
== PLC_NET_DNS2 : [None] 10.0.0.8
Enter command (u for usual changes, w to save, ? for help) w
Wrote /etc/planetlab/configs/site.xml
Merged
        /etc/planetlab/default_config.xml
and     /etc/planetlab/configs/site.xml
into    /etc/planetlab/plc_config.xml
You might want to type 'r' (restart plc), 'R' (reload plc) or 'q' (quit)
Enter command (u for usual changes, w to save, ? for help) r
==================== Stopping plc
PLC: Reverting /etc/resolv.conf:                           [  OK  ]
PLC: Removing /etc/plc_hosts:                              [  OK  ]
PLC: Stopping DNS server:                                  [  OK  ]
PLC: Ignoring request to stop myplc databases:             [  OK  ]
PLC: Stopping PostgreSQL server:                           [  OK  ]
PLC: Stopping web server:                                  [  OK  ]
PLC: Stopping mail server:                                 [  OK  ]
PLC: Reverting network files:                              [  OK  ]
==================== Starting plc
PLC: Generating network files:                             [  OK  ]
PLC: Starting mail server:                                 [  OK  ]
PLC: Generating SSL certificates for: PLC: WWW: PLC: API: P[  OK  ]:
PLC: Generating GPG keys:                                  [  OK  ]
PLC: Generating SSH keys:                                  [  OK  ]
PLC: Starting web server: PLC: Setting PHP timezone to GMT:[  OK  ]
PLC: Starting PostgreSQL server:                           [  OK  ]
PLC: Configuring the API:                                  [  OK  ]
PLC: Bootstrapping the database: PLC:  - 101-up-leases.sql [  OK  ]d): PLC:  - 102-up-isvalid.sql (dbdumped): PLC:  - 103-up-extensions.sql (dbdumped): PLC:  - 104-up-noderole.sql (dbdumped):
PLC: Starting DNS server: PLC: Configuring resolv.conf:    [  OK  ]
PLC: Creating BootCD variants:                             [  OK  ]
PLC: Rebuilding Boot CD:                                   [  OK  ]
                                                           [  OK  ]
PLC: Signing and indexing node packages:                   [  OK  ]

Enter command (u for usual changes, w to save, ? for help) s PLC_DB_PASSWORD
PLC_DB_PASSWORD = eecea785-291f-4188-96b5-dfbb0e0b0a1b

Step 4

Node Variables:

orbitplc1

<node_fqdn>orbitplc1.orbit-lab.org
<if_dns1>128.6.76.134
<if_dns2>128.6.76.133
<if_subnet_id>128.6.192.128
<if_netmask>255.255.255.192
<if_gateway>128.6.192.129
<if_ipaddr> 128.6.192.154
<if_mac>d8-d3-85-67-06-3d
<2nd_if_mac>d8-d3-85-67-06-3c
<ilo_mac>d8-d3-85-bc-43-ab

orbitplc2

<node_fqdn>orbitplc2.orbit-lab.org
<if_dns1>128.6.76.134
<if_dns2>128.6.76.133
<if_subnet_id>128.6.192.128
<if_netmask>255.255.255.192
<if_gateway>128.6.192.129
<if_ipaddr> 128.6.192.155
  1. The deployment variable:
    [native@localhost ~]$ ls /var/www/html/boot/ | grep bootstrapfs
    bootstrapfs-planetlab-f12-x86_64.tar.bz2
    bootstrapfs-planetlab-f12-x86_64.tar.bz2.sha1sum
    
Last modified 12 years ago Last modified on May 15, 2012, 4:05:46 PM
Note: See TracWiki for help on using the wiki.