Project

General

Profile

Wiki » History » Version 4

Parag Mhashilkar, 09/02/2011 11:48 AM

1 1 Parag Mhashilkar
h1. Documentation
2 1 Parag Mhashilkar
3 1 Parag Mhashilkar
h2. Creating a IFGridftpServerBase Image
4 1 Parag Mhashilkar
5 2 Parag Mhashilkar
OpenNebula specification file used for Base Image creation is as follows
6 2 Parag Mhashilkar
7 2 Parag Mhashilkar
<pre>
8 2 Parag Mhashilkar
NAME   = IFGridftpServerBase
9 2 Parag Mhashilkar
CPU    = 1
10 2 Parag Mhashilkar
VCPU   = 2
11 4 Parag Mhashilkar
MEMORY = 4096
12 2 Parag Mhashilkar
13 2 Parag Mhashilkar
DISK   = [
14 2 Parag Mhashilkar
           source   = /cloud/images/OpenNebula/images/current-image.img,
15 2 Parag Mhashilkar
           save     = yes,
16 2 Parag Mhashilkar
           target   = vda,
17 2 Parag Mhashilkar
           bus = virtio,
18 2 Parag Mhashilkar
           persistent = yes,
19 2 Parag Mhashilkar
           readonly = no
20 2 Parag Mhashilkar
         ]
21 2 Parag Mhashilkar
22 2 Parag Mhashilkar
DISK   = [
23 2 Parag Mhashilkar
  type     = swap,
24 4 Parag Mhashilkar
  size     = 4096,
25 2 Parag Mhashilkar
  target   = vdb ]
26 2 Parag Mhashilkar
27 2 Parag Mhashilkar
NIC    = [ NETWORK = "FermiCloud" ]
28 2 Parag Mhashilkar
29 2 Parag Mhashilkar
FEATURES=[ acpi="no" ]
30 2 Parag Mhashilkar
31 2 Parag Mhashilkar
GRAPHICS = [
32 2 Parag Mhashilkar
  type    = "vnc",
33 2 Parag Mhashilkar
  listen  = "127.0.0.1",
34 2 Parag Mhashilkar
  port    = "-1",
35 2 Parag Mhashilkar
  autoport = "yes",
36 2 Parag Mhashilkar
  keymap = "en-us"]
37 2 Parag Mhashilkar
38 2 Parag Mhashilkar
39 1 Parag Mhashilkar
CONTEXT = [
40 2 Parag Mhashilkar
    ip_public   = "$NIC[IP, NETWORK=\"FermiCloud\"]",
41 4 Parag Mhashilkar
    hostname    = "if-gridftp-base.fnal.gov",
42 2 Parag Mhashilkar
    netmask     = "255.255.254.0",
43 2 Parag Mhashilkar
    gateway     = "131.225.154.1",
44 2 Parag Mhashilkar
    ns          = "131.225.8.120",
45 2 Parag Mhashilkar
    files       = "/cloud/images/OpenNebula/templates/init.sh /home/parag/OpenNebula/cedps/k5login",
46 2 Parag Mhashilkar
    target      = "hdc",
47 2 Parag Mhashilkar
    root_pubkey = "id_dsa.pub",
48 2 Parag Mhashilkar
    username    = "opennebula",
49 1 Parag Mhashilkar
    user_pubkey = "id_dsa.pub"
50 1 Parag Mhashilkar
]
51 4 Parag Mhashilkar
52 4 Parag Mhashilkar
REQUIREMENTS = "HYPERVISOR=\"kvm\""
53 4 Parag Mhashilkar
54 2 Parag Mhashilkar
</pre>
55 3 Parag Mhashilkar
56 1 Parag Mhashilkar
Launch a new VM with dynamic IP address.
57 1 Parag Mhashilkar
58 1 Parag Mhashilkar
<pre>
59 4 Parag Mhashilkar
[parag@fcl002 cedps]$ onevm create IFGridftpServerBase.one
60 4 Parag Mhashilkar
61 4 Parag Mhashilkar
# Once the VM is running login into the VM from same of different machine
62 4 Parag Mhashilkar
[parag@cd-109337 ~]$ ssh root@131.225.154.59
63 4 Parag Mhashilkar
64 4 Parag Mhashilkar
# Stop and Disable ypbind
65 4 Parag Mhashilkar
[root@fermicloud002 ~]# service ypbind stop
66 4 Parag Mhashilkar
Shutting down NIS services:                                [  OK  ]
67 4 Parag Mhashilkar
[root@fermicloud002 ~]# chkconfig --list| grep ypbind
68 4 Parag Mhashilkar
ypbind          0:off   1:off   2:on    3:on    4:on    5:on    6:off
69 4 Parag Mhashilkar
[root@fermicloud002 ~]# chkconfig ypbind off
70 4 Parag Mhashilkar
[root@fermicloud002 ~]# chkconfig --list| grep ypbind
71 4 Parag Mhashilkar
ypbind          0:off   1:off   2:off   3:off   4:off   5:off   6:off
72 4 Parag Mhashilkar
73 4 Parag Mhashilkar
# Make the experiment disks available without ypbind
74 4 Parag Mhashilkar
[root@fermicloud002 etc]# scp root@fcl002:/etc/auto.* /etc/
75 4 Parag Mhashilkar
[root@fermicloud002 etc]# service autofs stop
76 4 Parag Mhashilkar
Stopping automount:                                        [  OK  ]
77 4 Parag Mhashilkar
[root@fermicloud002 etc]# service autofs start
78 4 Parag Mhashilkar
Starting automount:                                        [  OK  ]
79 4 Parag Mhashilkar
80 4 Parag Mhashilkar
# Check that experiment areas are available without ypbind
81 4 Parag Mhashilkar
[root@fermicloud002 etc]# ls -la /minos/app
82 4 Parag Mhashilkar
83 4 Parag Mhashilkar
# Install pacman & VDT
84 4 Parag Mhashilkar
[root@fermicloud002 etc]# cd /usr/local/
85 4 Parag Mhashilkar
[root@fermicloud002 pacman-3.29]# tar xzf /tmp/pacman-latest.tar.gz
86 4 Parag Mhashilkar
[root@fermicloud002 local]# cd pacman-3.29/
87 4 Parag Mhashilkar
[root@fermicloud002 pacman-3.29]# source ./setup.sh 
88 4 Parag Mhashilkar
[root@fermicloud002 etc]# cd /usr/local/
89 4 Parag Mhashilkar
[root@fermicloud002 local]# mkdir /usr/local/vdt-2.0.99
90 4 Parag Mhashilkar
[root@fermicloud002 local]# ln -s /usr/local/vdt-2.0.99 /usr/local/vdt
91 4 Parag Mhashilkar
[root@fermicloud002 local]# cd /usr/local/vdt-2.0.99/
92 4 Parag Mhashilkar
[root@fermicloud002 vdt-2.0.99]# pacman -get http://vdt.cs.wisc.edu/vdt_200_cache:VDT-Client
93 4 Parag Mhashilkar
Do you want to add [http://vdt.cs.wisc.edu/vdt_200_cache] to [trusted.caches]? (y/n/yall): yall
94 4 Parag Mhashilkar
95 4 Parag Mhashilkar
96 3 Parag Mhashilkar
97 3 Parag Mhashilkar
</pre>
98 2 Parag Mhashilkar
99 1 Parag Mhashilkar
100 1 Parag Mhashilkar
h3. From a new FermiCloud Base Image