Skip to content

Commit b09f984

Browse files
committed
Updating packer config for v1.2.1
1 parent 28359ad commit b09f984

File tree

4 files changed

+135
-123
lines changed

4 files changed

+135
-123
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ perl-lib/OESS/MYMETA.json
3737
perl-lib/OESS/MYMETA.yml
3838
perl-lib/OESS/lib/OESS/Collector
3939
perl-lib/OESS/lib/OESS/Collector.pm
40+
etc/packer-config/output-virtualbox-iso/
41+
etc/packer-config/packer_cache/

etc/packer-config/grnoc-public.repo

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[grnoc-public]
2+
name=GlobalNOC Public el6 Packages - $basearch
3+
baseurl=https://repo-public.grnoc.iu.edu/repo/6/$basearch
4+
enabled=1
5+
gpgcheck=1
6+
gpgkey=https://repo-public.grnoc.iu.edu/repo/RPM-GPG-KEY-GRNOC6

etc/packer-config/oess.json

Lines changed: 105 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,110 @@
11
{
22
"variables": {
3-
"oess_version":"1.1.6",
4-
"oess_version_friendly_name":"1.1.6"
5-
},
6-
"builders":[
7-
{
8-
"ssh_pty" : true,
9-
"type": "virtualbox-iso",
10-
"vm_name": "oess-{{user `oess_version`}}",
11-
"guest_os_type": "RedHat_64",
12-
"iso_url": "http://mirror.symnds.com/distributions/CentOS-vault/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso",
13-
"format": "ova",
14-
"export_opts": ["--vsys","0",
15-
"--product","OESS",
16-
"--producturl", "http://globalnoc.iu.edu/sdn/oess.html",
17-
"--vendor", "GlobalNOC",
18-
"--vendorurl","http://globalnoc.iu.edu",
19-
"--version", "{{user `oess_version_friendly_name`}}",
20-
"--description", "OESS {{user `oess_version_friendly_name`}}",
21-
"--eula", "Apache 2.0" ],
22-
"iso_checksum": "4a5fa01c81cc300f4729136e28ebe600",
23-
"http_directory": "./",
24-
"http_port_min": "8500",
25-
"iso_checksum_type": "md5",
26-
"disk_size": 10000,
27-
"boot_command": [
28-
"<esc><wait>",
29-
"linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg ",
30-
"<enter><wait>"
31-
],
32-
"shutdown_command": "sudo shutdown -h now",
33-
"ssh_username": "oess",
34-
"ssh_password": "oess",
35-
"ssh_wait_timeout": "300s",
36-
37-
"vboxmanage": [
38-
[
39-
"modifyvm",
40-
"{{.Name}}",
41-
"--memory",
42-
"1048"
43-
],
44-
45-
[
46-
"modifyvm",
47-
"{{.Name}}",
48-
"--cpus",
49-
"1"
50-
]
51-
]
52-
53-
54-
} ],
55-
"provisioners":[
56-
{
57-
"type": "file",
58-
"source":"mysql_settings.txt",
59-
"destination": "/tmp/mysql_settings.txt"
60-
3+
"oess_version": "1.2.1",
4+
"oess_version_friendly_name": "1.2.1"
615
},
62-
{ "type": "file",
63-
"source":"oess_settings.txt",
64-
"destination": "/tmp/oess_settings.txt"
65-
},
66-
{
67-
68-
"type": "shell",
69-
"inline": [
70-
71-
"sleep 30",
72-
"sudo yum makecache",
73-
"sudo yum -y install wget",
74-
"sudo useradd -r _snapp",
75-
"wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm",
76-
"sudo yum -y update",
77-
"sudo rpm -Uvh epel-release-6*.rpm",
78-
"wget http://globalnoc.iu.edu/sdn/oess/oess-releases/oess-{{user `oess_version`}}.tar.gz",
79-
"tar -xzf oess-{{user `oess_version`}}.tar.gz",
80-
"cd oess-{{user `oess_version`}}",
81-
"sudo yum -y install `find *.rpm`"
82-
]
83-
84-
},
85-
{
86-
"type": "shell",
87-
"inline": [
88-
"sudo /etc/init.d/mysqld start",
89-
"sudo /usr/bin/mysql_secure_installation < /tmp/mysql_settings.txt",
90-
"sudo perl /usr/bin/oess_setup.pl < /tmp/oess_settings.txt",
91-
"sudo /sbin/iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp --dport 6633 -j ACCEPT",
92-
"sudo /sbin/iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT",
93-
"sudo /sbin/iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT",
94-
"sudo /etc/init.d/iptables save",
95-
"sudo /etc/init.d/messagebus restart",
96-
"sudo /etc/init.d/oess restart",
97-
"sudo /etc/init.d/httpd restart",
98-
"sudo chkconfig mysqld on",
99-
"sudo chkconfig httpd on",
100-
"sudo chkconfig oess on"
101-
]
102-
}
6+
"builders": [
7+
{
8+
"ssh_pty" : true,
9+
"type": "virtualbox-iso",
10+
"vm_name": "oess-{{user `oess_version`}}",
11+
"guest_os_type": "RedHat_64",
12+
"iso_url": "http://mirror.umd.edu/centos/6.9/isos/x86_64/CentOS-6.9-x86_64-minimal.iso",
13+
"iso_checksum": "af4a1640c0c6f348c6c41f1ea9e192a2",
14+
"format": "ova",
15+
"export_opts": [
16+
"--vsys","0",
17+
"--product","OESS",
18+
"--producturl", "http://globalnoc.iu.edu/sdn/oess.html",
19+
"--vendor", "GlobalNOC",
20+
"--vendorurl","http://globalnoc.iu.edu",
21+
"--version", "{{user `oess_version_friendly_name`}}",
22+
"--description", "OESS {{user `oess_version_friendly_name`}}",
23+
"--eula", "Apache 2.0"
24+
],
25+
"http_directory": "./",
26+
"http_port_min": "8500",
27+
"iso_checksum_type": "md5",
28+
"disk_size": 10000,
29+
"boot_command": [
30+
"<esc><wait>",
31+
"linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg ",
32+
"<enter><wait>"
33+
],
34+
"shutdown_command": "sudo shutdown -h now",
35+
"ssh_username": "oess",
36+
"ssh_password": "oess",
37+
"ssh_wait_timeout": "600s",
38+
"vboxmanage": [
39+
[
40+
"modifyvm",
41+
"{{.Name}}",
42+
"--memory",
43+
"1048"
44+
],
45+
[
46+
"modifyvm",
47+
"{{.Name}}",
48+
"--cpus",
49+
"1"
50+
]
51+
]
52+
}
53+
],
54+
"provisioners": [
55+
{
56+
"type": "file",
57+
"source":"grnoc-public.repo",
58+
"destination": "/tmp/grnoc-public.repo"
59+
},
60+
{
61+
"type": "file",
62+
"source":"mysql_settings.txt",
63+
"destination": "/tmp/mysql_settings.txt"
64+
},
65+
{
66+
"type": "file",
67+
"source":"oess_settings.txt",
68+
"destination": "/tmp/oess_settings.txt"
69+
},
70+
{
71+
"type": "shell",
72+
"inline": [
73+
"sleep 30",
74+
"sudo mv /tmp/grnoc-public.repo /etc/yum.repos.d/",
75+
"sudo yum makecache",
76+
"sudo yum -y update",
77+
"sudo yum -y install wget",
78+
"wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm",
79+
"sudo rpm -Uvh epel-release-6*.rpm",
80+
"sudo useradd -r _snapp",
81+
"sudo yum -y install perl-GRNOC-RabbitMQ nox perl-OESS oess-core oess-frontend"
82+
]
83+
},
84+
{
85+
"type": "shell",
86+
"inline": [
87+
"sudo yum -y install rabbitmq-server",
88+
"sudo /etc/init.d/rabbitmq-server start"
89+
]
90+
},
91+
{
92+
"type": "shell",
93+
"inline": [
94+
"sudo yum -y install mysql-server",
95+
"sudo /etc/init.d/mysqld start",
96+
"sudo /usr/bin/mysql_secure_installation < /tmp/mysql_settings.txt",
97+
"sudo perl /usr/bin/oess_setup.pl < /tmp/oess_settings.txt",
98+
"sudo /sbin/iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp --dport 6633 -j ACCEPT",
99+
"sudo /sbin/iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT",
100+
"sudo /sbin/iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT",
101+
"sudo /etc/init.d/iptables save",
102+
"sudo /etc/init.d/oess restart",
103+
"sudo /etc/init.d/httpd restart",
104+
"sudo chkconfig mysqld on",
105+
"sudo chkconfig httpd on",
106+
"sudo chkconfig oess on"
107+
]
108+
}
103109
]
104110
}

etc/packer-config/oess_settings.txt

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,35 @@
11
y
2-
y
3-
localhost
4-
3306
2+
3+
54
root
65
oess
7-
https://no.way/
8-
mycert.crt
9-
mykey.key
10-
https://fake.net/
11-
6+
3
7+
8+
9+
10+
http://localhost/topology/
11+
oess@localhost
1212

1313

1414
OESS Notifier
1515
y
1616
oess
1717
oess
18-
snapp
19-
snapp
20-
untagged
21-
wrondomain.test.com
22-
/usr/share/oess-core/snapp.mysql.sql
23-
/usr/share/oess-core/snapp_base.mysql.sql
24-
/tmp/snapp_file_location/
2518
10
26-
1
27-
2
28-
n
29-
admin
30-
oess-test
19+
http://localhost/tsds/
20+
tsds
21+
tsds
22+
y
23+
switch
24+
switch
25+
switch
26+
localhost
27+
28+
oess
3129
oess
32-
test
33-
30+
oess
31+
oess@localhost
3432
y
35-
changeme
36-
changeme
33+
oess
34+
oess
3735
n

0 commit comments

Comments
 (0)