Merge branch 'master' into vim51_win8

This commit is contained in:
Min Chen 2013-02-25 11:55:12 -08:00
commit 084b6f3e05
3 changed files with 72 additions and 29 deletions

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
%BOOK_ENTITIES;
]>
@ -11,9 +11,7 @@
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@ -31,16 +29,6 @@
</note>
<para>The &PRODUCT; Management server can be installed using either RPM or DEB packages. These
packages will depend on everything you need to run the Management server.</para>
<section id="vhd-util">
<title>Downloading vhd-util</title>
<para>This procedure is required only for installations where XenServer is installed on the hypervisor hosts.</para>
<para>Before setting up the Management Server, download vhd-util from <ulink
url="http://download.cloud.com.s3.amazonaws.com/tools/vhd-util">vhd-util</ulink>.</para>
<para>If the Management Server is RHEL or CentOS, copy vhd-util to
/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver.</para>
<para>If the Management Server is Ubuntu, copy vhd-util to
/usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/vhd-util.</para>
</section>
<section id="management-server-install-rhel">
<title>Install on CentOS/RHEL</title>
<para>We start by installing the required packages:</para>
@ -50,4 +38,16 @@
<title>Install on Ubuntu</title>
<programlisting language="Bash">apt-get install cloud-client</programlisting>
</section>
</section>
<section id="vhd-util">
<title>Downloading vhd-util</title>
<para>This procedure is required only for installations where XenServer is installed on the
hypervisor hosts.</para>
<para>Before setting up the Management Server, download vhd-util from <ulink
url="http://download.cloud.com.s3.amazonaws.com/tools/vhd-util">vhd-util</ulink>.</para>
<para>If the Management Server is RHEL or CentOS, copy vhd-util to
/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver.</para>
<para>If the Management Server is Ubuntu, copy vhd-util to
/usr/lib/cloud/common/scripts/vm/hypervisor/xenserver.</para>
</section>
</section>

View File

@ -11,9 +11,7 @@
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@ -29,19 +27,23 @@
MySQL. See <xref linkend="management-server-install-db-external"/>.</para>
<orderedlist>
<listitem>
<para>Install MySQL from the package repository from your distribution:</para>
<para>Install MySQL from the package repository of your distribution:</para>
<para condition="community">On RHEL or CentOS:</para>
<programlisting language="Bash">yum install mysql-server</programlisting>
<para condition="community">On Ubuntu:</para>
<programlisting language="Bash">apt-get install mysql-server</programlisting>
</listitem>
<listitem>
<para>Edit the MySQL configuration (/etc/my.cnf or /etc/mysql/my.cnf, depending on your OS)
and insert the following lines in the [mysqld] section. You can put these lines below the
datadir line. The max_connections parameter should be set to 350 multiplied by the number of
Management Servers you are deploying. This example assumes one Management Server.</para>
<para>Open the MySQL configuration file. The configuration file is <filename>/etc/my.cnf</filename> or
<filename>/etc/mysql/my.cnf</filename>, depending on your OS.</para>
</listitem>
<listitem>
<para>Insert the following lines in the [mysqld] section. </para>
<para>You can put these lines below the datadir line. The max_connections parameter should be
set to 350 multiplied by the number of Management Servers you are deploying. This example
assumes one Management Server.</para>
<note>
<para>On Ubuntu, you can also create a file /etc/mysql/conf.d/cloudstack.cnf and add these
<para>On Ubuntu, you can also create a file <filename>/etc/mysql/conf.d/cloudstack.cnf</filename> and add these
directives there. Don't forget to add [mysqld] on the first line of the file.</para>
</note>
<programlisting language="Bash">innodb_rollback_on_timeout=1
@ -68,6 +70,36 @@ binlog-format = 'ROW'</programlisting>
questions.</para>
<programlisting language="Bash">mysql_secure_installation</programlisting>
</listitem>
<listitem>
<para>&PRODUCT; can be blocked by security mechanisms, such as SELinux. Disable SELinux to
ensure + that the Agent has all the required permissions.</para>
<para>Configure SELinux (RHEL and CentOS):</para>
<orderedlist numeration="loweralpha">
<listitem>
<para>Check whether SELinux is installed on your machine. If not, you can skip this
section.</para>
<para>In RHEL or CentOS, SELinux is installed and enabled by default. You can verify this
with:</para>
<programlisting language="Bash"><command>$ rpm -qa | grep selinux</command></programlisting>
</listitem>
<listitem>
<para>Set the SELINUX variable in <filename>/etc/selinux/config</filename> to
"permissive". This ensures that the permissive setting will be maintained after a system
reboot.</para>
<para>In RHEL or CentOS:</para>
<programlisting language="Bash">vi /etc/selinux/config</programlisting>
<para>Change the following line</para>
<programlisting>SELINUX=enforcing</programlisting>
<para>to this:</para>
<programlisting>SELINUX=permissive</programlisting>
</listitem>
<listitem>
<para>Set SELinux to permissive starting immediately, without requiring a system
reboot.</para>
<programlisting language="Bash"><command>$ setenforce permissive</command></programlisting>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Set up the database. The following command creates the "cloud" user on the
database.</para>
@ -98,10 +130,10 @@ binlog-format = 'ROW'</programlisting>
recommended that you replace this with a more secure value. See <xref
linkend="about-password-encryption"/>.</para>
</listitem>
<listitem>
<para>(Optional) For management_server_ip, you may explicitly specify cluster management
server node IP. If not specified, the local IP address will be used.</para>
</listitem>
<listitem>
<para>(Optional) For management_server_ip, you may explicitly specify cluster management
server node IP. If not specified, the local IP address will be used.</para>
</listitem>
</itemizedlist>
<programlisting language="Bash">cloud-setup-databases cloud:&lt;dbpassword&gt;@localhost \
--deploy-as=root:&lt;password&gt; \
@ -116,9 +148,6 @@ binlog-format = 'ROW'</programlisting>
<para>If you are running the KVM hypervisor on the same machine with the Management Server,
edit /etc/sudoers and add the following line:</para>
<programlisting language="Bash">Defaults:cloud !requiretty</programlisting>
<note>
<para>This type of single-machine setup is recommended only for a trial installation.</para>
</note>
</listitem>
<listitem>
<para>Now that the database is set up, you can finish configuring the OS for the Management

View File

@ -59,6 +59,20 @@ public class Upgrade410to420 implements DbUpgrade {
@Override
public void performDataMigration(Connection conn) {
PreparedStatement sql = null;
try {
sql = conn.prepareStatement("update vm_template set image_data_store_id = 1 where type = 'SYSTEM' or type = 'BUILTIN'");
sql.executeUpdate();
} catch (SQLException e) {
throw new CloudRuntimeException("Failed to upgrade vm template data store uuid: " + e.toString());
} finally {
if (sql != null) {
try {
sql.close();
} catch (SQLException e) {
}
}
}
}
@Override