make server libvirt files
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
81741878d3
commit
820723748b
13
Makefile
13
Makefile
|
@ -1,11 +1,12 @@
|
||||||
STAMP = $(shell date +%Y%m%d-%H%M%S)
|
STAMP = $(shell date +%Y%m%d.%H%M%S)
|
||||||
|
|
||||||
ls:
|
ls:
|
||||||
ls -l
|
@echo "make all # will make the cert file and debian package"
|
||||||
|
|
||||||
all:
|
all:
|
||||||
make make-ca-private-key
|
make make-ca-private-key
|
||||||
make make-Certificate-Authority-Certificate-file
|
make make-Certificate-Authority-Certificate-file
|
||||||
|
cd farm && make all
|
||||||
make create
|
make create
|
||||||
|
|
||||||
make-ca-private-key:
|
make-ca-private-key:
|
||||||
|
@ -23,15 +24,19 @@ create:
|
||||||
mkdir -p debian/files/etc/pki/CA/
|
mkdir -p debian/files/etc/pki/CA/
|
||||||
mkdir -p debian/DEBIAN
|
mkdir -p debian/DEBIAN
|
||||||
cp control debian/DEBIAN/
|
cp control debian/DEBIAN/
|
||||||
|
echo "Version: 0."$(STAMP) >> debian/DEBIAN/control
|
||||||
echo "2.0" > debian/debian-binary
|
echo "2.0" > debian/debian-binary
|
||||||
cp certificate_authority_certificate.pem debian/files/etc/pki/CA/cacert.pem
|
cp certificate_authority_key.pem debian/files/etc/pki/CA/cacert.pem
|
||||||
chmod 444 debian/files/etc/pki/CA/cacert.pem
|
cp farm/*server_key.pem debian/files/etc/pki/CA/
|
||||||
|
chmod 444 debian/files/etc/pki/CA/*.pem
|
||||||
cd debian/files/ && md5sum etc/pki/CA/cacert.pem > ../DEBIAN/md5sum
|
cd debian/files/ && md5sum etc/pki/CA/cacert.pem > ../DEBIAN/md5sum
|
||||||
cd debian/DEBIAN && tar --ignore-failed-read -cvJf ../control.tar.xz {post,pre}{inst,rm} md5sums control
|
cd debian/DEBIAN && tar --ignore-failed-read -cvJf ../control.tar.xz {post,pre}{inst,rm} md5sums control
|
||||||
cd debian/files && tar -cvJf ../data.tar.xz .
|
cd debian/files && tar -cvJf ../data.tar.xz .
|
||||||
cd debian && ar rcs ../wit-libvirt-tls-cert.$(STAMP).deb debian-binary control.tar.xz data.tar.xz
|
cd debian && ar rcs ../wit-libvirt-tls-cert.$(STAMP).deb debian-binary control.tar.xz data.tar.xz
|
||||||
|
dpkg-deb -I wit*.deb
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.pem
|
rm -f *.pem
|
||||||
rm -f *.deb
|
rm -f *.deb
|
||||||
rm -rf debian/
|
rm -rf debian/
|
||||||
|
cd farm && make clean
|
||||||
|
|
2
control
2
control
|
@ -1,6 +1,6 @@
|
||||||
Package: wit-libvirt-tls-cert
|
Package: wit-libvirt-tls-cert
|
||||||
Source: wit-libvirt-tls-cert
|
Source: wit-libvirt-tls-cert
|
||||||
Version: 0.1
|
OldVersion: 0.1
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Maintainer: Jeff Carr <jcarr@wit.com>
|
Maintainer: Jeff Carr <jcarr@wit.com>
|
||||||
Homepage: https://www.wit.com/
|
Homepage: https://www.wit.com/
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
info:
|
||||||
|
@echo "make all # makes the certs"
|
||||||
|
|
||||||
|
all:
|
||||||
|
make mkcerts
|
||||||
|
make certtool-farm01
|
||||||
|
make certtool-farm02
|
||||||
|
|
||||||
|
mkcerts:
|
||||||
|
certtool --generate-privkey > farm01_server_key.pem
|
||||||
|
certtool --generate-privkey > farm02_server_key.pem
|
||||||
|
|
||||||
|
certtool-farm01:
|
||||||
|
certtool --generate-certificate \
|
||||||
|
--template farm01_server_template.info \
|
||||||
|
--load-privkey farm01_server_key.pem \
|
||||||
|
--load-ca-certificate ../certificate_authority_certificate.pem \
|
||||||
|
--load-ca-privkey ../certificate_authority_key.pem \
|
||||||
|
--outfile farm01_server_certificate.pem
|
||||||
|
|
||||||
|
certtool-farm02:
|
||||||
|
certtool --generate-certificate \
|
||||||
|
--template farm02_server_template.info \
|
||||||
|
--load-privkey farm02_server_key.pem \
|
||||||
|
--load-ca-certificate ../certificate_authority_certificate.pem \
|
||||||
|
--load-ca-privkey ../certificate_authority_key.pem \
|
||||||
|
--outfile farm02_server_certificate.pem
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.pem
|
|
@ -0,0 +1,5 @@
|
||||||
|
organization = WIT.COM Inc.
|
||||||
|
cn = farm01
|
||||||
|
tls_www_server
|
||||||
|
encryption_key
|
||||||
|
signing_key
|
|
@ -0,0 +1,5 @@
|
||||||
|
organization = WIT.COM Inc.
|
||||||
|
cn = farm02
|
||||||
|
tls_www_server
|
||||||
|
encryption_key
|
||||||
|
signing_key
|
Loading…
Reference in New Issue