Проект

Общее

Профиль

Creating Linux Instances » История » Версия 4

Версия 3 (Владимир Ипатов, 04.12.2012 14:14) → Версия 4/6 (Владимир Ипатов, 04.12.2012 14:17)

h1. Creating Linux Instances

{{toc}}

h2. Create Debian instance.

New instance on the NODE1 with failover on the NODE2, with one disk size 10Gb and 256M RAM.
INSTANCE_NAME must be resolvable via DNS.
<pre>
gnt-instance add -t drbd -o debootstrap+default -s 10g -B memory=256m -n NODE1:NODE2 INSTANCE_NAME
</pre>

Real example: create new instance
* on the node gnt2
* with failover on gnt1
* with three disks:
** 10g on volume group xenvg
** 600m on volume group xenvg (probably for swap)
* 5g on volume group xenvg
* DNS name vg-test1
* IP address will be configured automatically by resolving vg-test1' IP and matching it against @/etc/ganeti/networks@

<pre>
gnt-instance add -t drbd -o debootstrap+default --disk 0:size=10g,vg=xenvg --disk 1:size=600m,vg=xenvg --disk 2:size=5g,vg=newvg -B memory=256m -n gnt2:gnt1 vg-test1
</pre>

*NOTE:* the @vg=....@ option to specify different volume groups will be available since Ganeti 2.4.0 release.

h2. SSH

All new instances, including 'sci' are going with empty root password and no ssh server installed.
You should first log in to the instance using @gnt-instance console INSTANCE@ command, then set
root's password using @passwd@ command and install ssh server using
<pre>
apt-get install openssh-server
</pre>

If you are using windows, you must download any ssh client, e.g. putty:
http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

h2.
h3. Instance import

For example, you have an image, tar, etc. of OS from other XEN(or physical) machine.
To start it on sci-cd you must add instance with --no-install flag:
<pre>
gnt-instance add -t drbd -B memory=5192m -n node1:node2 -o debootstrap+default --no-install --no-name-check --no-ip-check --net=0:link=dmz --disk 0:size=4G --disk 1:size=1024M --disk 2:size=100G --disk 3:size=50G terminal
</pre>
--no-namecheck used when machine name doesn't resolv in any ip(ip may resolve my dns or /etc/hosts)
--no-ip-check used when no ip provided while creating instance

h2. Create another GNU/Linux instances



h3. Create Ubuntu instance Instance import

There is os variant ubootstrap+default for Ubuntu. For example, you have an image, tar, etc. of OS from other XEN(or physical) machine.
To create ubuntu start it on sci-cd you must add instance execute command like this:

with --no-install flag:
<pre>
gnt-instance add -t drbd -o ubootstrap+default -s 4g -B memory=512m memory=5192m -n gnt1:gnt2 ubuntu node1:node2 -o debootstrap+default --no-install --no-name-check --no-ip-check --net=0:link=dmz --disk 0:size=4G --disk 1:size=1024M --disk 2:size=100G --disk 3:size=50G terminal
</pre>
--no-namecheck used when machine name doesn&#39;t resolv in any ip(ip may resolve my dns or /etc/hosts)
--no-ip-check used when no ip provided while creating instance