Change-Id: Ifb9c27ec0ad2bbcd6a9b15f8f6a266f5c220e4bf
Reviewed-on: http://photon-jenkins.eng.vmware.com/1217
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: suezzelur <anishs@vmware.com>
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,18 @@ |
0 |
+[Unit] |
|
1 |
+Description=Consul Template Agent |
|
2 |
+Wants=basic.target |
|
3 |
+After=basic.target network.target consul.service |
|
4 |
+ |
|
5 |
+[Service] |
|
6 |
+EnvironmentFile=-/etc/default/consul-template |
|
7 |
+ExecStart=/usr/bin/consul agent $OPTIONS -config-dir /etc/consul-template.d |
|
8 |
+ExecReload=/bin/kill -HUP $MAINPID |
|
9 |
+User=root |
|
10 |
+Group=root |
|
11 |
+KillMode=process |
|
12 |
+Restart=on-abnormal |
|
13 |
+RestartSec=10s |
|
14 |
+LimitNOFILE=4096 |
|
15 |
+ |
|
16 |
+[Install] |
|
17 |
+WantedBy=multi-user.target |
0 | 18 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,58 @@ |
0 |
+Summary: Consul Template-0.15.0 |
|
1 |
+Name: consul-template |
|
2 |
+Version: 0.15.0 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+License: Mozilla Public License, version 2.0 |
|
5 |
+URL: https://www.consul.io/ |
|
6 |
+Group: System Environment/Security |
|
7 |
+Vendor: VMware, Inc. |
|
8 |
+Distribution: Photon |
|
9 |
+Source0: https://releases.hashicorp.com/%{name}/%{version}/%{name}_%{version}_linux_amd64.zip |
|
10 |
+%define sha1 consul-template=6cb37c40ea9a3885f12121d74f1b50a814fd0bb1 |
|
11 |
+Source1: consul-template.service |
|
12 |
+Requires: shadow |
|
13 |
+Requires: consul >= 0.6.4 |
|
14 |
+BuildRequires: unzip |
|
15 |
+ |
|
16 |
+%description |
|
17 |
+Generic template rendering and notifications with Consul |
|
18 |
+ |
|
19 |
+%prep -p exit |
|
20 |
+%setup -qcn %{name}-%{version} |
|
21 |
+ |
|
22 |
+%build |
|
23 |
+ |
|
24 |
+%install |
|
25 |
+install -vdm755 %{buildroot}%{_bindir} |
|
26 |
+install -vdm755 %{buildroot}%{_sysconfdir}/consul-template.d |
|
27 |
+install -vdm755 %{buildroot}/usr/lib/systemd/system |
|
28 |
+ |
|
29 |
+chown -R root:root %{buildroot}%{_bindir} |
|
30 |
+ |
|
31 |
+mv %{_builddir}/%{name}-%{version}/%{name} %{buildroot}%{_bindir}/ |
|
32 |
+ |
|
33 |
+cp %{SOURCE1} %{buildroot}/usr/lib/systemd/system |
|
34 |
+ |
|
35 |
+%check |
|
36 |
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
|
37 |
+ |
|
38 |
+%post -p /sbin/ldconfig |
|
39 |
+%systemd_post %{name}.service |
|
40 |
+ |
|
41 |
+%postun -p /sbin/ldconfig |
|
42 |
+%systemd_postun_with_restart %{name}.service |
|
43 |
+ |
|
44 |
+%preun |
|
45 |
+%systemd_preun %{name}.service |
|
46 |
+ |
|
47 |
+%clean |
|
48 |
+rm -rf %{buildroot}/* |
|
49 |
+ |
|
50 |
+%files |
|
51 |
+%{_bindir}/%{name} |
|
52 |
+%dir %{_sysconfdir}/%{name}.d |
|
53 |
+/usr/lib/systemd/system/%{name}.service |
|
54 |
+ |
|
55 |
+%changelog |
|
56 |
+* Sun Jul 24 2016 Ivan Porto Carrero <icarrero@vmware.com> 0.15.0-1 |
|
57 |
+- Initial build. First version |
0 | 58 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,17 @@ |
0 |
+[Unit] |
|
1 |
+Description=Consul Agent |
|
2 |
+Wants=basic.target |
|
3 |
+After=basic.target network.target |
|
4 |
+ |
|
5 |
+[Service] |
|
6 |
+EnvironmentFile=-/etc/default/consul |
|
7 |
+ExecStart=/usr/bin/consul agent $OPTIONS -config-dir /etc/consul.d |
|
8 |
+ExecReload=/bin/kill -HUP $MAINPID |
|
9 |
+User=consul |
|
10 |
+Group=consul |
|
11 |
+KillSignal=SIGINT |
|
12 |
+Restart=on-failure |
|
13 |
+LimitNOFILE=131072 |
|
14 |
+ |
|
15 |
+[Install] |
|
16 |
+WantedBy=multi-user.target |
0 | 17 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,79 @@ |
0 |
+Summary: Consul-0.6.4 |
|
1 |
+Name: consul |
|
2 |
+Version: 0.6.4 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+License: Mozilla Public License, version 2.0 |
|
5 |
+URL: https://www.consul.io/ |
|
6 |
+Group: System Environment/Security |
|
7 |
+Vendor: VMware, Inc. |
|
8 |
+Distribution: Photon |
|
9 |
+Source0: https://releases.hashicorp.com/%{name}/%{version}/%{name}_%{version}_linux_amd64.zip |
|
10 |
+%define sha1 consul=85de555de27cae126f0f89e762f6136e1c7104b6 |
|
11 |
+Source1: consul.service |
|
12 |
+Requires: shadow |
|
13 |
+BuildRequires: unzip |
|
14 |
+ |
|
15 |
+%description |
|
16 |
+Service discovery and configuration made easy. Distributed, highly available, and datacenter-aware. |
|
17 |
+ |
|
18 |
+%prep -p exit |
|
19 |
+%setup -qcn %{name}-%{version} |
|
20 |
+ |
|
21 |
+%build |
|
22 |
+ |
|
23 |
+%install |
|
24 |
+install -vdm755 %{buildroot}%{_bindir} |
|
25 |
+install -vdm755 %{buildroot}%{_sysconfdir}/%{name}.d |
|
26 |
+install -vdm755 %{buildroot}/usr/lib/systemd/system |
|
27 |
+ |
|
28 |
+chown -R root:root %{buildroot}%{_bindir} |
|
29 |
+ |
|
30 |
+mv %{_builddir}/%{name}-%{version}/%{name} %{buildroot}%{_bindir}/ |
|
31 |
+ |
|
32 |
+cp %{SOURCE1} %{buildroot}/usr/lib/systemd/system |
|
33 |
+install -vdm755 %{buildroot}/var/lib/consul |
|
34 |
+ |
|
35 |
+%check |
|
36 |
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
|
37 |
+ |
|
38 |
+%post -p /sbin/ldconfig |
|
39 |
+if [ $1 -eq 1 ]; then |
|
40 |
+ # this is initial installation |
|
41 |
+ if ! getent group %{name} >/dev/null; then |
|
42 |
+ groupadd -g 850 %{name} |
|
43 |
+ fi |
|
44 |
+ if ! getent passwd %{name} >/dev/null; then |
|
45 |
+ useradd -c "Consul Agent" -d /var/lib/%{name} -g %{name} \ |
|
46 |
+ -s /bin/false -u 850 %{name} |
|
47 |
+ fi |
|
48 |
+fi |
|
49 |
+%systemd_post consul.service |
|
50 |
+ |
|
51 |
+%postun -p /sbin/ldconfig |
|
52 |
+if [ $1 -eq 0 ]; then |
|
53 |
+ # this is delete operation |
|
54 |
+ if getent passwd %{name} >/dev/null; then |
|
55 |
+ userdel %{name} |
|
56 |
+ fi |
|
57 |
+ if getent group %{name} >/dev/null; then |
|
58 |
+ groupdel %{name} |
|
59 |
+ fi |
|
60 |
+fi |
|
61 |
+%systemd_postun_with_restart consul.service |
|
62 |
+ |
|
63 |
+%preun |
|
64 |
+%systemd_preun consul.service |
|
65 |
+ |
|
66 |
+%clean |
|
67 |
+rm -rf %{buildroot}/* |
|
68 |
+ |
|
69 |
+%files |
|
70 |
+%defattr(-,consul,consul) |
|
71 |
+%{_bindir}/%{name} |
|
72 |
+/usr/lib/systemd/system/%{name}.service |
|
73 |
+%dir /var/lib/%{name} |
|
74 |
+%dir %{_sysconfdir}/%{name}.d |
|
75 |
+ |
|
76 |
+%changelog |
|
77 |
+* Sun Jul 24 2016 Ivan Porto Carrero <icarrero@vmware.com> 0.6.4-1 |
|
78 |
+- Initial build. First version |
0 | 79 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,22 @@ |
0 |
+[Unit] |
|
1 |
+Description=Nomad |
|
2 |
+Documentation=https://nomadproject.io/docs/ |
|
3 |
+Wants=network-online.target |
|
4 |
+After=network-online.target consul.service |
|
5 |
+Requires=consul.service |
|
6 |
+ |
|
7 |
+[Service] |
|
8 |
+Type=notify |
|
9 |
+User=root |
|
10 |
+Group=root |
|
11 |
+EnvironmentFile=-/etc/default/nomad |
|
12 |
+ExecStart=/usr/bin/nomad agent $OPTIONS -config /etc/nomad.d |
|
13 |
+LimitNOFILE=infinity |
|
14 |
+LimitNPROC=infinity |
|
15 |
+LimitCORE=infinity |
|
16 |
+TasksMax=infinity |
|
17 |
+KillSignal=SIGINT |
|
18 |
+Restart=on-abnormal |
|
19 |
+ |
|
20 |
+[Install] |
|
21 |
+WantedBy=multi-user.target |
0 | 22 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,60 @@ |
0 |
+Summary: Nomad Scheduler 0.4.0 |
|
1 |
+Name: nomad |
|
2 |
+Version: 0.4.0 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+License: Mozilla Public License, version 2.0 |
|
5 |
+URL: https://www.nomadproject.io/ |
|
6 |
+Group: System Environment/Security |
|
7 |
+Vendor: VMware, Inc. |
|
8 |
+Distribution: Photon |
|
9 |
+Source0: https://releases.hashicorp.com/%{name}/%{version}/%{name}_%{version}_linux_amd64.zip |
|
10 |
+%define sha1 nomad=62685976dc86b3d2c89b529ade8e4d83be4d80fa |
|
11 |
+Source1: %{name}.service |
|
12 |
+Requires: shadow |
|
13 |
+BuildRequires: unzip |
|
14 |
+ |
|
15 |
+%description |
|
16 |
+Easily deploy applications at any scale. A Distributed, Highly Available, Datacenter-Aware Scheduler |
|
17 |
+ |
|
18 |
+%prep -p exit |
|
19 |
+%setup -qcn %{name}-%{version} |
|
20 |
+ |
|
21 |
+%build |
|
22 |
+ |
|
23 |
+%install |
|
24 |
+install -vdm755 %{buildroot}%{_bindir} |
|
25 |
+install -vdm755 %{buildroot}%{_sysconfdir}/nomad.d |
|
26 |
+install -vdm755 %{buildroot}/usr/lib/systemd/system |
|
27 |
+ |
|
28 |
+chown -R root:root %{buildroot}%{_bindir} |
|
29 |
+ |
|
30 |
+mv %{_builddir}/%{name}-%{version}/%{name} %{buildroot}%{_bindir}/ |
|
31 |
+ |
|
32 |
+cp %{SOURCE1} %{buildroot}/usr/lib/systemd/system |
|
33 |
+install -vdm755 %{buildroot}/var/lib/%{name} |
|
34 |
+ |
|
35 |
+%check |
|
36 |
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
|
37 |
+ |
|
38 |
+%post -p /sbin/ldconfig |
|
39 |
+%systemd_post %{name}.service |
|
40 |
+ |
|
41 |
+%postun -p /sbin/ldconfig |
|
42 |
+%systemd_postun_with_restart %{name}.service |
|
43 |
+ |
|
44 |
+%preun |
|
45 |
+%systemd_preun %{name}.service |
|
46 |
+ |
|
47 |
+%clean |
|
48 |
+rm -rf %{buildroot}/* |
|
49 |
+ |
|
50 |
+%files |
|
51 |
+%defattr(-,%{name},%{name}) |
|
52 |
+%{_bindir}/%{name} |
|
53 |
+/usr/lib/systemd/system/%{name}.service |
|
54 |
+%dir /var/lib/%{name} |
|
55 |
+%dir %{_sysconfdir}/%{name}.d |
|
56 |
+ |
|
57 |
+%changelog |
|
58 |
+* Sun Jul 24 2016 Ivan Porto Carrero <icarrero@vmware.com> 0.4.0-1 |
|
59 |
+- Initial build. First version |
0 | 8 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,17 @@ |
0 |
+[Unit] |
|
1 |
+Description=vault Agent |
|
2 |
+Documentation=https://www.vaultproject.io/docs/index.html |
|
3 |
+Wants=basic.target |
|
4 |
+After=basic.target network.target consul.service |
|
5 |
+ |
|
6 |
+[Service] |
|
7 |
+ExecStart=/usr/bin/vault server -config /etc/vault.d/vault.hcl |
|
8 |
+ExecReload=/bin/kill -HUP $MAINPID |
|
9 |
+User=root |
|
10 |
+Group=root |
|
11 |
+KillSignal=SIGINT |
|
12 |
+Restart=on-failure |
|
13 |
+LimitNOFILE=131072 |
|
14 |
+ |
|
15 |
+[Install] |
|
16 |
+WantedBy=multi-user.target |
0 | 17 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,64 @@ |
0 |
+Summary: Vault secrets management |
|
1 |
+Name: vault |
|
2 |
+Version: 0.6.0 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+License: Mozilla Public License, version 2.0 |
|
5 |
+URL: https://www.vaultproject.io/ |
|
6 |
+Group: System Environment/Security |
|
7 |
+Vendor: VMware, Inc. |
|
8 |
+Distribution: Photon |
|
9 |
+Source0: https://releases.hashicorp.com/%{name}/%{version}/%{name}_%{version}_linux_amd64.zip |
|
10 |
+%define sha1 vault=ec1115ba639870a63460884a59b44c77b0c71221 |
|
11 |
+Source1: vault.service |
|
12 |
+Source2: vault.hcl |
|
13 |
+Requires: shadow |
|
14 |
+Requires: consul >= 0.6.4 |
|
15 |
+BuildRequires: unzip |
|
16 |
+ |
|
17 |
+%description |
|
18 |
+Vault secures, stores, and tightly controls access to tokens, passwords, certificates, API keys, and other secrets in modern computing. Vault handles leasing, key revocation, key rolling, and auditing. Vault presents a unified API to access multiple backends: HSMs, AWS IAM, SQL databases, raw key/value, and more. |
|
19 |
+ |
|
20 |
+%prep -p exit |
|
21 |
+%setup -qcn %{name}-%{version} |
|
22 |
+ |
|
23 |
+%build |
|
24 |
+ |
|
25 |
+%install |
|
26 |
+install -vdm755 %{buildroot}%{_bindir} |
|
27 |
+install -vdm755 %{buildroot}/usr/lib/systemd/system |
|
28 |
+install -vdm755 %{buildroot}/%{_sysconfdir}/vault.d |
|
29 |
+ |
|
30 |
+chown -R root:root %{buildroot}%{_bindir} |
|
31 |
+ |
|
32 |
+mv %{_builddir}/%{name}-%{version}/%{name} %{buildroot}%{_bindir}/ |
|
33 |
+ |
|
34 |
+cp %{SOURCE1} %{buildroot}/usr/lib/systemd/system |
|
35 |
+cp %{SOURCE2} %{buildroot}%{_sysconfdir}/vault.d/ |
|
36 |
+install -vdm755 %{buildroot}/var/lib/vault |
|
37 |
+ |
|
38 |
+%check |
|
39 |
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
|
40 |
+ |
|
41 |
+%post -p /sbin/ldconfig |
|
42 |
+setcap cap_ipc_lock=+ep /usr/bin/%{name} |
|
43 |
+%systemd_post vault.service |
|
44 |
+ |
|
45 |
+%postun -p /sbin/ldconfig |
|
46 |
+%systemd_postun_with_restart vault.service |
|
47 |
+ |
|
48 |
+%preun |
|
49 |
+%systemd_preun vault.service |
|
50 |
+ |
|
51 |
+%clean |
|
52 |
+rm -rf %{buildroot}/* |
|
53 |
+ |
|
54 |
+%files |
|
55 |
+%{_bindir}/%{name} |
|
56 |
+%{_sysconfdir}/%{name}.d/vault.hcl |
|
57 |
+/usr/lib/systemd/system/%{name}.service |
|
58 |
+%dir %{_sysconfdir}/%{name}.d |
|
59 |
+%dir /var/lib/%{name} |
|
60 |
+ |
|
61 |
+%changelog |
|
62 |
+* Sun Jul 24 2016 Ivan Porto Carrero <icarrero@vmware.com> 0.6.0-1 |
|
63 |
+- Initial build. First version |