110 likes | 281 Views
MyPLC. My Little PlanetLab Mark Huang mlhuang@cs.princeton.edu. PlanetLab Central. PlanetLab Architecture. Site A. Internet. Site B. Site C. PlanetLab Platform Applications. PlanetLab Federation Scalability and internationalization Private PlanetLabs OneLab, EverLab
E N D
MyPLC My Little PlanetLab Mark Huang mlhuang@cs.princeton.edu
PlanetLab Central PlanetLab Architecture Site A Internet Site B Site C
PlanetLab Platform Applications • PlanetLab Federation • Scalability and internationalization • Private PlanetLabs • OneLab, EverLab • Wireless, PXE boot, other custom hardware • Distributed application server • Cluster management • PlanetLab meets Rocks • DistributedOpenHosting.com?
PlanetLab Federation Internet
PlanetLab Central • Database server • Primary information store • Sites, nodes, users, events, configuration • API server • Database frontend • Authentication, programmatic interface • Web server • API frontend • User GUI, administrative interface • Boot server • Secure software distribution • Optional servers • PlanetFlow, Mail, Support, Spam/AV, Monitor, DNS, Build, CVS, QA • Outside the scope of the architecture
PlanetLab In A Box • Converted basic Fedora Core 2 server into a complete PLC • Installed packages into existing filesystem • Modified configuration files in place • Required network access to Princeton • CVS, rsync • Limited customizability • Only at install time • Complex, fragile • Untaggable mod_python PostgreSQL Apache OpenSSL xmlsec1 FC2 PLC bootcd_v3 pl_db bootmanager plc_www plc_api
Basic ideas Isolate all code in a chroot jail Define and set all relevant configuration variables in a single file Easy to install Monolithic Portable Easy to administer Single point of configuration Snapshots, backups Upgrades More secure PLC Linux MyPLC /plc
Components • Code: /plc/root.img • Loopback mounted on /plc/root • Subject to upgrade • Data: /plc/data • Stored on host filesystem, bind mounted on /plc/root/data (i.e., /data to MyPLC) • Database, generated files, custom RPMs, boot logs • Not subject to upgrade • Configuration: /etc/planetlab • Symlink from /plc/data/etc/planetlab • Configuration files, keys, certificates • Stored with data, not subject to upgrade
Startup • MyPLC is 95% prebuilt • Startup sequence completes the last 5% • Idempotent startup • All scripts assume startup from scratch • Slow, hard to react to changes or triggers • Predictable, less code • Mini System V Init • /etc/plc.d scripts configure and start individual services
Configuration Apache /etc/httpd/conf/httpd.conf /etc/plc.d PostgreSQL /var/lib/pgsql/data/postgresql.conf /etc/init.d/plc GnuPG /etc/planetlab/pubring.gpg plc_config Network /etc/hosts, /etc/resolv.conf SSH /etc/planetlab/root_ssh_key.rsa plc_config.xml plc_config.php SSL /etc/pki/tls plc_config.py Website /var/www/html PLCAPI /usr/share/plc_api
DemoLab • VMware server • This laptop, FC4 under VMware • Optimizations • Private VMware network • 172.16.68.0/24 • Private DNS server • demo.vmw • VMware node • planetlab1.demo.vmw • 172.16.68.101 MyPLC bind (DNS) 172.16.68.100 FC4 vmnet1 172.16.68.0/24 planetlab1 172.16.68.101 planetlab2 172.16.68.102