Project

General

Profile

Wiki » History » Version 6

Parag Mhashilkar, 09/02/2011 01:22 PM

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 6 Parag Mhashilkar
[root@fermicloud002 vdt-2.0.99]# pacman -get http://vdt.cs.wisc.edu/vdt_200_cache:EDG-Make-Gridmap \
93 6 Parag Mhashilkar
http://vdt.cs.wisc.edu/vdt_200_cache:CA-Certificates-Updater \
94 6 Parag Mhashilkar
http://vdt.cs.wisc.edu/vdt_200_cache:CA-Certificates \
95 6 Parag Mhashilkar
http://vdt.cs.wisc.edu/vdt_200_cache:Fetch-CRL 
96 6 Parag Mhashilkar
http://vdt.cs.wisc.edu/vdt_200_cache:Configure-Fetch-CRL \
97 6 Parag Mhashilkar
http://vdt.cs.wisc.edu/vdt_200_cache:VOMS-Client \
98 6 Parag Mhashilkar
http://vdt.cs.wisc.edu/vdt_200_cache:Globus-Base-Data-Server \
99 6 Parag Mhashilkar
http://vdt.cs.wisc.edu/vdt_200_cache:EDG-Make-Gridmap
100 4 Parag Mhashilkar
Do you want to add [http://vdt.cs.wisc.edu/vdt_200_cache] to [trusted.caches]? (y/n/yall): yall
101 1 Parag Mhashilkar
102 5 Parag Mhashilkar
# Setup CA Certificates and other required VDT services
103 5 Parag Mhashilkar
[root@fermicloud002 vdt-2.0.99]# source /usr/local/vdt/setup.sh 
104 5 Parag Mhashilkar
105 5 Parag Mhashilkar
# Change $VDT_LOCATION/vdt-app-data/vdt-update-certs/vdt-update-certs.conf to enable OSG CA Certs
106 5 Parag Mhashilkar
[root@fermicloud002 vdt-2.0.99]# vi $VDT_LOCATION/vdt-app-data/vdt-update-certs/vdt-update-certs.conf
107 5 Parag Mhashilkar
[root@fermicloud002 vdt-2.0.99]# vdt-setup-ca-certificates --certs-dir /usr/local/vdt-2.0.99/
108 5 Parag Mhashilkar
109 5 Parag Mhashilkar
# Make sure Host certs and keys are in place
110 5 Parag Mhashilkar
[root@fermicloud002 vdt-2.0.99]# ls -la /etc/grid-security/
111 5 Parag Mhashilkar
112 5 Parag Mhashilkar
# First make sure that /etc/services do not have gsiftp service. If it does remove it
113 5 Parag Mhashilkar
# Enable VDT Services
114 5 Parag Mhashilkar
[root@fermicloud002 vdt-2.0.99]# vdt-control --list
115 5 Parag Mhashilkar
Service                 | Type   | Desired State
116 5 Parag Mhashilkar
------------------------+--------+--------------
117 5 Parag Mhashilkar
fetch-crl              | cron    | do not enable 
118 5 Parag Mhashilkar
vdt-rotate-logs        | cron    | do not enable 
119 5 Parag Mhashilkar
vdt-update-certs       | cron    | do not enable 
120 5 Parag Mhashilkar
gsiftp                 | inetd   | do not enable 
121 5 Parag Mhashilkar
[root@fermicloud002 vdt-2.0.99]# vdt-control --enable fetch-crl vdt-rotate-logs vdt-update-certs gsiftp
122 5 Parag Mhashilkar
running 'vdt-register-service --name fetch-crl --enable'... ok
123 5 Parag Mhashilkar
running 'vdt-register-service --name vdt-rotate-logs --enable'... ok
124 5 Parag Mhashilkar
running 'vdt-register-service --name vdt-update-certs --enable'... ok
125 5 Parag Mhashilkar
running 'vdt-register-service --name gsiftp --enable'... ok
126 5 Parag Mhashilkar
[root@fermicloud002 vdt-2.0.99]# vi /etc/services
127 5 Parag Mhashilkar
[root@fermicloud002 vdt-2.0.99]# vdt-control --on
128 5 Parag Mhashilkar
enabling cron service vdt-rotate-logs... ok
129 5 Parag Mhashilkar
enabling inetd service gsiftp... ok
130 5 Parag Mhashilkar
enabling cron service vdt-update-certs... ok
131 5 Parag Mhashilkar
enabling cron service fetch-crl... ok
132 4 Parag Mhashilkar
133 3 Parag Mhashilkar
134 3 Parag Mhashilkar
</pre>
135 2 Parag Mhashilkar
136 1 Parag Mhashilkar
137 1 Parag Mhashilkar
h3. From a new FermiCloud Base Image