<para>SlapOS can be described as a cloud operating system in which "everything is a process" unlike Unix in which "everything is a file". If one has to manage thousands of servers with thousands of processes, hundred different applications in multiple different releases or versions, SlapOS can help you a lot by making the whole management process well specified, automated and under control.</para>
<para>The goal of this tutorial is to teach how to use SlapOS in the windows.
<itemizedlist>
<listitem><para>First you need register an account in the slapos.org (refer to <xreflinkend="ch_register_slapos_org"/>)</para></listitem>
<listitem><para>Then install SlapOS slave node in the windows (refer to <xreflinkend="ch_install_slapos"/>)</para></listitem>
<listitem><para>Finally release software and create instanace of software in the SlapOS node (refer to <xreflinkend="ch_create_instance_wordpress"/>)</para></listitem>
</itemizedlist>
</para>
</chapter>
<chapterid="ch_register_slapos_org"><title>Registering in the slapos.org</title>
<para>Before we start, we need to register in VIFIB community Cloud. By doing so, we will obtain X509 certificate and key, make sure you store both of them to your local files. Take also note of the computer id, for example "COMP-161", store it somewhere. All of these are later needed for the installing process.</para>
<para>Refer to <ulinkurl="http://www.slapos.org/wiki/slapos-Wiki.Home/osoe-Lecture.SlapOS.Extended/developer-Installing.SlapOS.Slave.Node.Source"></ulink> in the section VIFIB Registration.</para>
<para>There are 2 ways to install SlapOS slave node in the winodws. One is by MSI package, the other is by sources.</para>
<section><title>Installing by MSI Package</title>
<para>Download slapos windows installer: <ulinkurl="http://www.erp5.org/dists/installer/slapos-0.158.2-windows-x86-all-in-one.exe"></ulink></para>
<para>Run this MSI installer, click Next and type the information: the destination path, startup menu name, etc.</para>
<para>In the SlapOS Node Information wizard page, type the information got at above chapter.
<itemizedlist>
<listitem><para>Computer ID</para></listitem>
<listitem><para>Key</para></listitem>
<listitem><para>Certificate</para></listitem>
</itemizedlist>
At the final wizard page, click Install.
</para>
<para>Waiting for everything done.</para>
</section>
<section><title>Installing by sources</title>
<para>We need Cygwin environment in order to install SlapOS slave node from sources in the Windows. </para>
<section><title>Setting Up Cygwin</title>
<para>Go to <ulinkurl="http://cygwin.com/">"http://cygwin.com/"</ulink> and click on <ulinkurl="http://cygwin.com/setup.exe">"Install Cygwin Now!"</ulink>. This will download a GUI installer called setup.exe which can be run to download a complete cygwin installation via the internet. Follow the instructions on each screen to install Cygwin. </para>
<para>The Root Directory for Cygwin (default C:\cygwin) will become / within your Cygwin installation. You must have write access to the parent directory, and any ACLs on the parent directory will determine access to installed files.</para>
<para>By default, setup.exe will install only the packages in the Base category and their dependencies, resulting in a minimal Cygwin installation. We need choose the packages required by SlapOS, see <xreflinkend="appendix_cygwin_packages"/>. Since setup.exe automatically selects dependencies, be careful not to unselect any required packages.</para>
<para>Refer to: <ulinkurl="http://cygwin.com/cygwin-ug-net/setup-net.html"/></para>
<para>You can install cygwin in the command console either:
Now double click the desktop icon "Cygwin" or run C:\cygwin\Cygwin.bat (Assume the cygwin root directory is C:\cygwin) to open a cygwin box. First configure tty, make the font bigger:
<programlisting>
root@JONDY ~
$ cat <<EOF > .minttyrc
BoldAsFont=no
Font=Courier New
FontHeight=16
Scrollbar=none
EOF
</programlisting>
</para>
</section>
<section><title>Buildout SlapOS</title>
<para>Double click the desktop icon "Cygwin" or C:\cygwin\Cygwin.bat (Assume the cygwin root directory is C:\cygwin). A cygwin box will open, the following commands are typed in this box.
<para>Download openvpn windows installer, for example, openvpn-2.2.1-install.exe, then install openvpn. By default, it installed at <filename>C:\Program Files\OpenVPN</filename></para>
<para>Copy required files of openvpn to /opt/openvpn and edit client.ovpn
<para>Assume we have registered a server which id is 'COMP-161', and saved its key and certificate files in the home directory. So we can use script 'configure.sh' to do all the configuration.
<chapterid="ch_create_instance_wordpress"><title>Creating an instancee of Wordpress in the SlapOS</title>
<para>Copy our cygwin inotifyx to download-cache/dist, so buildout will find it other than pypi.
</para>
<para>The common way to release a software is to login vifib website. But we haven't integrated this software.cfg into vifib, so we verify it in the local machine. It need a patch:
<para>Some dlls need to rebase in order to avoid fork issue in the Cygwin. Refer to <ulinkurl="http://cygwin.com/faq.html"></ulink> question 4.44 or search "rebase" in this page. First, exit all Cygwin processes and stop all Cygwin services.
<programlisting>
$ net stop cfgslapos
$ ps -ef | grep python2.7
# kill all these process which start by supervisord
$ exit
</programlisting>
If you install SlapOS node by MSI package, Click Start menu, select SlapOS program group, click Run rebaseall. Otherwise, download rebase-software.bat and save it in the cygwin root path.
Wait for a while, otherwise there is no partition assigned
$ bin/slapos node software
$ bin/slapos node instance
$ bin/slapos node start all
or
$ bin/slapos node start demoapp
$ bin/slapos node restart all
Recreate instance
$ bin/slapos node instance --only_cp slappart9
$ bin/slapos request mydemoapp demoapp # not this, it request node in the cloud
Now, you can visit the demo in the browser by the url.
Refer to: http://community.slapos.org/wiki/osoe-Lecture.SlapOS.Extended/developer-Installing.SlapOS.Client
</para>
</chapter>
<chapter><title>Make installer from source</title>
<section><title></title>
<para></para></section>
</chapter>
<!--
A.
To install the IPv6 protocol for Windows XP with SP2 or later, do the following:
Log on to the computer with a user account that has privileges to change network configuration.
Click Start, click Control Panel, and then double-click Network Connections.
Right-click any local area connection, and then click Properties.
Click Install.
In the Select Network Component Type dialog box, click Protocol, and then click Add.
In the Select Network Protocol dialog box, click Microsoft TCP/IP version 6, and then click OK.
Click Close to save changes to your network connection.
Alternately, from the Windows XP desktop, click Start, point to Programs, point to Accessories, and then click Command Prompt. At the command prompt, type netsh interface ipv6 install.
For the IPv6 protocol for Windows XP with SP1, do the following:
Log on to the computer with a user account that has privileges to change network configuration.
Click Start, click Control Panel, and then double-click Network Connections.
Right-click any local area connection, and then click Properties.
Click Install.
In the Select Network Component Type dialog box, click Protocol, and then click Add.
In the Select Network Protocol dialog box, click Microsoft IPv6 Developer Edition, and then click OK.
Click Close to save changes to your network connection.
Alternately, from the Windows XP desktop, click Start, point to Programs, point to Accessories, and then click Command Prompt. At the command prompt, type netsh interface ipv6 install.
To install the IPv6 protocol for Windows XP with no service packs installed:
Log on to the computer running Windows XP with a user account that has privileges to change network configuration.
Open a command prompt. From the Windows XP desktop, click Start, point to Programs, point to Accessories, and then click Command Prompt.
At the command prompt, type ipv6 install.
Regardless of the version of Windows XP, to use RPC applications over IPv6, you must first restart the computer.
Q. How can I tell if the IPv6 protocol is installed for Windows XP with no service packs installed? It does not appear in the list of protocols in Network Connections. A. The installation of the IPv6 Protocol for Windows XP with no service packs installed does not use the standard procedure for protocol installation in the Network Connections folder. Therefore, it is not visible as an installed protocol. To determine whether IPv6 is installed, type ipv6 if at a command prompt. If IPv6 is installed, you will see a display of your IPv6 interfaces and their configuration. Otherwise, the Ipv6.exe tool will indicate that IPv6 is not installed.