Should I turn this into a wiki page? On Thu, Nov 21, 2013 at 12:27 PM, Miguel González <migonzal...@activitycentral.com> wrote: > I'm going to describe in detail my current dev environment. Hopefully, > it could be useful for somebody. > > > Pre-requisites > ==== > > I'm using a VirtualBox and installing a virtual machine with Fedora18. > > I'm also use vagrant to automatically manage the virtual machine. > There packages available from its website [1]. I'm currently using > version 1.3.4. > > > Booting a fresh virtual machine > ==== > > The file Vagrantfile defines a basic image to download (= vagrant box) > and allows to add configuration details like network configuration. > > This is a simplified but fully functional version: > > ```ruby > # -*- mode: ruby -*- > # vi: set ft=ruby : > > VAGRANTFILE_API_VERSION = "2" > > Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| > config.vm.box = "fedora-18-x86_64" > config.vm.box_url = > "http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box" > > # config.vm.network :public_network > > # config.ssh.forward_agent = true > > config.vm.synced_folder ".", "/vagrant", :disabled => true > > config.vm.provider :virtualbox do |vb| > # vb.gui = true > end > > end > ``` > > With this command, vagrant downloads the basic image (only the first > time) and deploys and boots up the virtual machine: > > ``` > $ vagrant up > ``` > > > Then, to access the vagrant virtual machine: > > ``` > $ vagrant ssh > ``` > > Installing XSCE > ==== > > Inside the vm now it's possible to follow the install instructions > [2]. I'm copying them below: > > > Install git and ansible (for dependencies): > > ``` > sudo su - > yum install -y git ansible > ``` > > Update ansible to use a : > > ``` > cd ~/ > git clone https://github.com/ansible/ansible.git > cd ansible > git checkout 07b59da99 > python setup.py install > ``` > > Clone the XSCE git repo and run the actual setup: > > ``` > cd ~/ > git clone https://github.com/XSCE/xsce > cd xsce/ > ./runansible > ``` > > XSCE autoconfigures itself according to the interfaces it detects. If > XSCE only detects one interface, as in this setup, it configures > itself in "appliance mode". But the service are not reachable because > `eth0` in the host machine is using a subnetwork. > > One solutions is define a port forward for every service. Other > solution, the one I'm using currently is to add a new interface > **after installing XSCE**. > > To do it, from the host machine I halt the vm, uncomment a line in > Vagrantfile and run again: > > ``` > $ vagrant halt > $ vim Vagrantfile > ... uncomment # config.vm.network :public_network > $ vagrant up > $ vagrant ssh > ``` > > The guest machine has 2 interfaces, the internal subnet and another > bridged to the same LAN as the host > > ``` > [vagrant@schoolserver ~]$ ip a > 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > inet 127.0.0.1/8 scope host lo > inet6 ::1/128 scope host > valid_lft forever preferred_lft forever > 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast > state UP qlen 1000 > link/ether 08:00:27:f0:90:8a brd ff:ff:ff:ff:ff:ff > inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0 > inet6 fe80::a00:27ff:fef0:908a/64 scope link > valid_lft forever preferred_lft forever > 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast > state UP qlen 1000 > link/ether 08:00:27:ca:fe:ca brd ff:ff:ff:ff:ff:ff > inet 192.168.0.100/24 brd 192.168.0.255 scope global eth1 > inet6 fe80::a00:27ff:feca:feca/64 scope link > valid_lft forever preferred_lft forever > ``` > > And now all the services can be accessed from the LAN by any device > for testing, in this case, using 192.168.0.100. > > > The main problem here is that running XSCE installation process again > (`./runansible`) will mess the configuration because **it will find 2 > interfaces now**. So, before configuring the server again, disable > eth1: > > > ``` > [root@schoolserver xsce]# ifconfig eth1 down > [root@schoolserver xsce]# ./runansible > ``` > > > More.. > ==== > > > - To begin with a new fresh virtual machine: > > ``` > $ vagrant destroy > $ vagrant up > ``` > > > - Uncommenting `config.ssh.forward_agent = true` in Vagrantfile, it is > possible to write in a git repo from the guest using host's keys. > > > - Take a look to https://github.com/XSCE/xsce/pull/76 when we are > trying to simplify adding new *roles* (services) to XSCE. > > > > 1: http://downloads.vagrantup.com/ > > 2: https://github.com/XSCE/xsce/blob/master/docs/INSTALL.rst > > On Wed, Nov 20, 2013 at 11:01 AM, Anish Mangal > <an...@activitycentral.com> wrote: >> Hi Sebastian, >> >> You should be able to download the image from here (Thanks to Thomas Gillard >> for uploading the file): >> http://people.sugarlabs.org/Tgillard/XSCE.ova >> >> Please verify the md5sum once you have downloaded the file. >> 56a4f141b564b0d2bd65c543a5e585c6 >> >> About your question on dev environment I am ccing Santi and Miguel who can >> answer it best. It may depend on what part of the server you want to >> contribute to, but I think you should mostly be able to get away with just a >> VM image. I don't believe anyone has tried a chroot env (though I could be >> wrong) but it _might_ be possible. >> >> Also, for testing with real clients (like xo laptops) you are probably going >> to need something for the LAN side (an access point). There are a few >> permutations here, but I will step back and let more the technical experts >> converse :-) >> >> Cheers, >> Anish >> >> >> >> On Wed, Nov 20, 2013 at 10:54 AM, Sebastian Silva >> <sebast...@fuentelibre.org> wrote: >>> >>> Thanks that will be simpler. Actually I'm more interested in what a good >>> dev environment would be in order to contribute. >>> Do I need to make a fedora chroot? >>> >>> Regards, >>> Sebastian >>> >>> El 19/11/13 09:51, Anish Mangal escribió: >>> >>> I tried uploading it to xsce.activitycentral.com, but I ran out of space >>> in my user dir. Normally the appliance is 1.3G, but this also has 400mb of >>> IIAB test dataset. >>> >>> I'll give it another shot in another area where there is some free space, >>> and get back. >>> >>> >>> On Tue, Nov 19, 2013 at 7:24 PM, Sebastian Silva >>> <sebast...@fuentelibre.org> wrote: >>>> >>>> Hi >>>> I tried this but google drive problematic to download from as it requires >>>> to download from a browser. Not adequate for 1.6gb. Let me know if I can >>>> pick it up from a regular download place. Why is it so big? >>>> >>>> Regards, >>>> Sebastian >>>> >>>> El 17/11/13 20:48, Anish Mangal escribió: >>>> >>>>> Download the XSCE Virtualbox appliance from here >>>>> https://docs.google.com/file/d/0B3eW2YPe6koIVXRVbDhSR0xXQ1U (approx 1.6 >>>>> GB) >>>> >>>> >>> >>> >> > > > > -- > Miguel González > Activity Central: http://www.activitycentral.com > _______________________________________________ > Server-devel mailing list > Server-devel@lists.laptop.org > http://lists.laptop.org/listinfo/server-devel
-- David Farning Activity Central: http://www.activitycentral.com _______________________________________________ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel