Difference between revisions of "WOCE Build Environment"

From WebOS-Ports
Jump to: navigation, search
(Client Setup)
(WOCE Build Environment)
Line 29: Line 29:
 
4.  Install Vagrant [http://vagrantup.com/v1/docs/getting-started/index.html (Vagrant Getting Started Guide)]
 
4.  Install Vagrant [http://vagrantup.com/v1/docs/getting-started/index.html (Vagrant Getting Started Guide)]
  
5.  From a Command Prompt in the directory you have set aside for your woce-be VM
+
5.  From a Command Prompt in the directory you have set aside for the build environment
  
  vagrant box add woce-be <nowiki>http://bit.ly/QS3G1p</nowiki>
+
  git clone git://www.github.com/woce/woce-be
vagrant init woce-be
 
  
====OSX Setup====
+
===Usage===
  
1. Edit:
+
From a Command Prompt in the woce-be directory:
/System/Library/LaunchDaemons/com.apple.nfsd.plist
 
''(requires superuser)''
 
  
2. Scroll down to the line that reads:
+
'''Bring the VM online'''
<string>/sbin/nfsd</string>
+
  vagrant up
 
+
''(You can ignore stdin: not a tty errors- these are normal)''
3. Add a new line below it that reads:
 
<string>-N</string>
 
 
 
4. Save the file, close it
 
 
 
5. Open Terminal.app and run the following, noting down the uid entry
 
 
 
id
 
 
 
6. Edit:
 
  /etc/exports
 
''(requires superuser)''
 
 
 
7. Add the following:
 
  
''/PATH/TO/SHARED/DIR'' -mapall=''USERID''
+
'''SSH into the VM'''
 
 
8. Replace ''/PATH/TO/SHARED/DIR'' with the location of woce-build on your host OS
 
 
 
9. Replace ''USERID'' with the uid noted in step 5
 
 
 
8. Save and close it
 
 
 
9. Open Terminal.app and run the following:
 
 
 
sudo nfsd enable
 
sudo nfsd checkexports
 
showmount -e
 
 
 
If successful, your share's path should be printed to stdout.
 
 
 
====Ubuntu Setup====
 
 
 
1. Install NFS Server
 
sudo apt-get install nfs-kernel-server
 
 
 
2. Edit:
 
/etc/exports
 
''(requires superuser)''
 
 
 
3. Add the following to the end:
 
/PATH/TO/HOST/SHARE 127.0.0.1(rw,sync,insecure,no_root_squash)
 
 
 
4. Save and close /etc/exports
 
 
 
5. Run the following command:
 
sudo nfs-kernel-server restart
 
 
 
====Arch Linux Setup====
 
 
 
1. Install NFS Server
 
sudo pacman -S nfs-utils
 
 
 
2. Edit:
 
/etc/exports
 
''(requires superuser)''
 
 
 
3. Add the following to the end:
 
/PATH/TO/HOST/SHARE 127.0.0.1(rw,sync,insecure,no_root_squash)
 
 
 
4. Save and close /etc/exports
 
 
 
5. Run the following commands in this order:
 
rc.d start rpcbind (or: rc.d start portmap)
 
rc.d start nfs-common (or: rc.d start nfslock)
 
rc.d start nfs-server (or: rc.d start nfsd)
 
 
 
===Client Setup===
 
 
 
1. Start up the VM and connect to it
 
vagrant up
 
 
  vagrant ssh
 
  vagrant ssh
''(make sure to run this in the same directory as the Vagrantfile created during setup)''
 
 
2. Edit:
 
/etc/fstab
 
  
3. Modify the bottom line, replacing ''(requires super user)'':
+
From here, there will be a woce-build directory in /vagrant/home.
/PATH/TO/HOST/SHARE
 
with the directory containing woce-build and (if a custom build is required) LunaSysMgr on your host machine
 
  
4. Save and close the fstab
+
And when you're done:
  
5. run the following command:
+
'''Shut down the VM'''
  sudo mount /srv/share
+
  vagrant destroy

Revision as of 12:30, 5 July 2012

Develop in your environment, Build in ours.

WOCE Build Environment

Introduction

The WOCE BE uses Vagrant and Virtualbox to create a self-contained build environment for use on OSX and Linux Hosts.

Our goal is to create a consistent build setup for developers so that if there are issues with builds we can know that we all are singing off the same sheet of music.

Minimum Requirements

x86 based computer running OSX(10.5 minimum) or Linux(32bit or 64bit).

Enough resources to allot:

  • 1 "Virtual CPU"
  • 1GB "Virtual RAM"
  • 20GB "Virtual HD"

Installation Procedure

1. From your development host go to Vagrant Downloads and download the latest version for your host.

2. From your development host go to Virtualbox Downloads and download the latest version for your host.

3. Install Virtualbox

4. Install Vagrant (Vagrant Getting Started Guide)

5. From a Command Prompt in the directory you have set aside for the build environment

git clone git://www.github.com/woce/woce-be

Usage

From a Command Prompt in the woce-be directory:

Bring the VM online

vagrant up

(You can ignore stdin: not a tty errors- these are normal)

SSH into the VM

vagrant ssh

From here, there will be a woce-build directory in /vagrant/home.

And when you're done:

Shut down the VM

vagrant destroy