OpenChange Appliance

Version 19 (Julien Kerihuel, 07/19/2010 07:34 pm)

1 1
h1. OpenChange Appliance
2 1
3 1
h2. Introduction
4 1
5 7 Julien Kerihuel
The OpenChange appliance is a virtual environment configured to provide a development environment similar to the OpenChange's development one. It contains everything to run OpenChange server out of the box and to start developing or following latest evolution of the OpenChange project. 
6 1
7 7 Julien Kerihuel
Existing appliances have been created using "Virtualbox 3.2.6":http://www.virtualbox.org/wiki/Downloads but was exported using the OVF format (Open Virtualization Format) with 0.9 legacy enabled to maximize the number and versions of virtualization systems able to import this appliance. This guide primarily focuses on VirtualBox, but additional setup and configuration information for other virtualization systems is welcome.
8 7 Julien Kerihuel
9 7 Julien Kerihuel
h2. Available appliances
10 7 Julien Kerihuel
11 7 Julien Kerihuel
h3. Ubuntu 10.04 Lucid LTS appliance
12 7 Julien Kerihuel
13 17 Julien Kerihuel
* *size: 1.7Gb*
14 7 Julien Kerihuel
* x86 architecture
15 7 Julien Kerihuel
* 5Gb of Hard Disk drive
16 7 Julien Kerihuel
* 256Mb of memory
17 7 Julien Kerihuel
* 2 network interfaces:
18 7 Julien Kerihuel
** eth0: NAT
19 7 Julien Kerihuel
** eth1: Bridged with a default IP set to 10.254.0.100
20 5 Julien Kerihuel
21 8 Julien Kerihuel
22 1
h2. Download OpenChange Virtual Appliance
23 1
24 18 Julien Kerihuel
You can either download the appliance through FTP or rsync
25 1
26 18 Julien Kerihuel
h3. FTP download method
27 18 Julien Kerihuel
28 3 Julien Kerihuel
The appliance can be retrieved through FTP at the following address: ftp://openchange:openchange@labs.openchange.org
29 1
30 3 Julien Kerihuel
<pre>
31 3 Julien Kerihuel
$ wget ftp://openchange:openchange@labs.openchange.org/ubuntu-appliance.tgz
32 1
$ wget ftp://openchange:openchange@labs.openchange.org/ubuntu-appliance.sha512sum
33 18 Julien Kerihuel
</pre>
34 18 Julien Kerihuel
35 18 Julien Kerihuel
An unpacked version of the appliance is available within the unpacked/ubuntu-appliance directory under the root directory of the FTP account.
36 18 Julien Kerihuel
37 18 Julien Kerihuel
h3. rsync download method
38 18 Julien Kerihuel
39 18 Julien Kerihuel
To fetch via rsync use this command:
40 18 Julien Kerihuel
41 18 Julien Kerihuel
<pre>
42 18 Julien Kerihuel
$ rsync -az labs.openchange.org::ubuntu-appliance ubuntu-appliance
43 3 Julien Kerihuel
</pre>
44 4 Julien Kerihuel
45 4 Julien Kerihuel
h3. Check Integrity
46 4 Julien Kerihuel
47 4 Julien Kerihuel
The OpenChange appliance comes with different level of integrity:
48 4 Julien Kerihuel
* one SHA512 file to check tarball integrity
49 4 Julien Kerihuel
* one SHA512 within the archive to check appliance data integrity
50 4 Julien Kerihuel
51 4 Julien Kerihuel
<pre>
52 4 Julien Kerihuel
$ sha512sum -c ubuntu-appliance.sha512sum
53 4 Julien Kerihuel
ubuntu-appliance.tgz: OK
54 4 Julien Kerihuel
55 4 Julien Kerihuel
$ tar xzvf ubuntu-appliance.tgz
56 4 Julien Kerihuel
SHA512SUM
57 4 Julien Kerihuel
ubuntu-appliance.mf
58 4 Julien Kerihuel
ubuntu-appliance.ovf
59 4 Julien Kerihuel
ubuntu-appliance.vmdk
60 4 Julien Kerihuel
61 4 Julien Kerihuel
$ sha512sum -c SHA512SUM
62 4 Julien Kerihuel
ubuntu-appliance.mf: OK
63 4 Julien Kerihuel
ubuntu-appliance.ovf: OK
64 4 Julien Kerihuel
ubuntu-appliance.vmdk: OK
65 4 Julien Kerihuel
</pre>
66 8 Julien Kerihuel
67 8 Julien Kerihuel
68 8 Julien Kerihuel
h2. Importing appliance in VirtualBox
69 8 Julien Kerihuel
70 8 Julien Kerihuel
h3. Using command line tools
71 8 Julien Kerihuel
72 19 Julien Kerihuel
From your Linux console, replace /path/to with the path where you extracted the appliance.
73 19 Julien Kerihuel
It is advised to first run a dry-run using the following command:
74 8 Julien Kerihuel
<pre>
75 1
$ VBoxManage import /path/to/ubuntu-appliance.ovf --dry-run
76 19 Julien Kerihuel
</pre>
77 19 Julien Kerihuel
78 19 Julien Kerihuel
If successful, it is safe to import the appliance using the command below:
79 19 Julien Kerihuel
<pre>
80 19 Julien Kerihuel
$ VBoxManage import /path/to/ubuntu-appliance.ovf
81 8 Julien Kerihuel
</pre>
82 8 Julien Kerihuel
83 8 Julien Kerihuel
h3. Using VirtualBox GUI
84 8 Julien Kerihuel
85 8 Julien Kerihuel
# Click _File_ in the menu bar, then select _Import Appliance_
86 8 Julien Kerihuel
# Click the Choose button, navigate to the directory where you extracted the appliance and select the OVF file (ubuntu-appliance.ovf) 
87 9 Julien Kerihuel
88 10 Julien Kerihuel
!http://tracker.openchange.org/attachments/72/vbox_appliance_import.png!
89 10 Julien Kerihuel
90 12 Julien Kerihuel
After VirtualBox is finished import the appliance, you can boot it. If you encounter issues when launching the virtual machine for the first time, please refer to the [[OpenChange_Appliance#Troubleshooting|troubleshooting section]] of this guide.
91 9 Julien Kerihuel
92 13 Julien Kerihuel
h2. Run OpenChange appliance
93 13 Julien Kerihuel
94 13 Julien Kerihuel
h3. Account information
95 13 Julien Kerihuel
Once you have started the appliance, you will access the default console login screen. The default account enabled with sudo privileges to run command as root is:
96 13 Julien Kerihuel
* username: *openchange*
97 13 Julien Kerihuel
* password: *openchange*
98 13 Julien Kerihuel
99 13 Julien Kerihuel
*You are strongly encouraged to change this password as soon as possible.*
100 13 Julien Kerihuel
101 13 Julien Kerihuel
h3. Networking
102 13 Julien Kerihuel
103 13 Julien Kerihuel
The appliance comes with 2 network interfaces configured:
104 13 Julien Kerihuel
* NAT on eth0
105 13 Julien Kerihuel
* Bridged on eth1 with an IP address set to *10.254.0.100* by default.
106 13 Julien Kerihuel
107 13 Julien Kerihuel
You can dynamically change the IP address using:
108 13 Julien Kerihuel
<pre>
109 13 Julien Kerihuel
sudo ifconfig eth1 XXX.XXX.XXX.XXX
110 13 Julien Kerihuel
</pre>
111 13 Julien Kerihuel
112 14 Julien Kerihuel
or make this change permanent by changing the eth1 address in */etc/network/interfaces*.
113 1
114 14 Julien Kerihuel
Note that you will need to either edit or delete the existing MAPI profile to reflect this change.
115 14 Julien Kerihuel
116 14 Julien Kerihuel
h3. Services
117 14 Julien Kerihuel
118 14 Julien Kerihuel
The appliance comes with samba4 and openchange server installed and configured.
119 14 Julien Kerihuel
Two accounts exist on the Samba4 and OpenChange server:
120 14 Julien Kerihuel
* *Administrator* with a password set to *#1OpenChange*. The password above is also the adminpass used during samba4 provisioning.
121 14 Julien Kerihuel
* *openchange* user with a password set to *openchange* 
122 14 Julien Kerihuel
123 14 Julien Kerihuel
You can run OpenChange server either by running the *_startme.sh_* script located in the openchange's account home directory or using:
124 14 Julien Kerihuel
<pre>
125 14 Julien Kerihuel
$ sudo /usr/local/samba/sbin -d5 -i -M single
126 14 Julien Kerihuel
</pre>
127 14 Julien Kerihuel
128 14 Julien Kerihuel
It is recommended to keep the server running in single mode and dedicate a console to it.
129 14 Julien Kerihuel
130 14 Julien Kerihuel
h4. OpenChange client
131 14 Julien Kerihuel
132 14 Julien Kerihuel
The appliance comes with a default mapiprofile database and a default openchange profile you can use to test OpenChange server:
133 14 Julien Kerihuel
<pre>
134 14 Julien Kerihuel
$ mapiprofile --list
135 14 Julien Kerihuel
We have 1 profiles in the database:
136 14 Julien Kerihuel
        Profile = openchange [default]
137 14 Julien Kerihuel
$ mapiprofile --dump
138 14 Julien Kerihuel
Profile: openchange
139 14 Julien Kerihuel
        username          == openchange
140 14 Julien Kerihuel
        password          == openchange
141 14 Julien Kerihuel
        mailbox           == /o=First Organization/ou=First Administrative Group/cn=Recipients/cn=openchange
142 14 Julien Kerihuel
        workstation       == ubuntu
143 14 Julien Kerihuel
        domain            == OPENCHANGE
144 14 Julien Kerihuel
        server            == 10.254.0.100
145 14 Julien Kerihuel
</pre>
146 13 Julien Kerihuel
147 15 Julien Kerihuel
After the server is started (see previous section), you can call openchangeclient to test/stress OpenChange server:
148 15 Julien Kerihuel
<pre>
149 15 Julien Kerihuel
$ openchangeclient --mailbox
150 15 Julien Kerihuel
$ openchangeclient --fetchmail
151 15 Julien Kerihuel
</pre>
152 15 Julien Kerihuel
153 16 Julien Kerihuel
154 16 Julien Kerihuel
h2. Update OpenChange appliance
155 16 Julien Kerihuel
156 16 Julien Kerihuel
The appliance comes with a subversion trunk repository of openchange (_/home/openchange/openchange/_) and its associated samba4 git-master revision (_/home/openchange/openchange/samba4/_) which means you can follow latest openchange advances using *svn up* from openchange trunk directory and rebuil openchange sources on purposes.
157 16 Julien Kerihuel
158 16 Julien Kerihuel
159 9 Julien Kerihuel
h2. Troubleshooting
160 11 Julien Kerihuel
161 11 Julien Kerihuel
h3. Failed to open a session for the virtual machine
162 11 Julien Kerihuel
163 11 Julien Kerihuel
!http://tracker.openchange.org/attachments/73/vbox_e_fail_isession.png!
164 11 Julien Kerihuel
165 11 Julien Kerihuel
If you encounter the above message when running the appliance, run:
166 11 Julien Kerihuel
# Click on _Settings_, then select _Storage_ panel
167 11 Julien Kerihuel
# Click on the appliance vmdk in the Storage tree and remove it (right click and _Remove attachment_)
168 11 Julien Kerihuel
# Click on _Add attachment_ or _Add Hard drive_ and select the appliance vmdk again (vmdk may be added automatically)
169 11 Julien Kerihuel
# Power on the virtual machine