Make the VM IPv4 configurable
The default IP address is supposed to be used by Libre En Communs for the deployed VM. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
parent
495c347e77
commit
eb7b6eb78a
|
@ -38,6 +38,7 @@ guix-commit.txt: Makefile
|
||||||
sed \
|
sed \
|
||||||
"s#DOMAIN#$(DOMAIN)#g ; \
|
"s#DOMAIN#$(DOMAIN)#g ; \
|
||||||
s#LETSENCRYPT_EMAIL#$(LETSENCRYPT_EMAIL)#g ; \
|
s#LETSENCRYPT_EMAIL#$(LETSENCRYPT_EMAIL)#g ; \
|
||||||
|
s#VM_IPV4_ADDRESS#$(VM_IPV4_ADDRESS)#g ; \
|
||||||
s#VM_SSH_PUB_KEY#$(VM_SSH_PUB_KEY)#g" $< > $@
|
s#VM_SSH_PUB_KEY#$(VM_SSH_PUB_KEY)#g" $< > $@
|
||||||
|
|
||||||
%.sh: %.sh.tmpl guix-commit.txt Makefile
|
%.sh: %.sh.tmpl guix-commit.txt Makefile
|
||||||
|
|
|
@ -25,6 +25,7 @@ AC_CHECK_PROG([SED], [sed], [sed])
|
||||||
|
|
||||||
AC_SUBST([DOMAIN], [])
|
AC_SUBST([DOMAIN], [])
|
||||||
AC_SUBST([LETSENCRYPT_EMAIL], [])
|
AC_SUBST([LETSENCRYPT_EMAIL], [])
|
||||||
|
AC_SUBST([VM_IPV4_ADDRESS], [])
|
||||||
AC_SUBST([VM_SSH_PUB_KEY], [])
|
AC_SUBST([VM_SSH_PUB_KEY], [])
|
||||||
|
|
||||||
AC_ARG_WITH([domain],
|
AC_ARG_WITH([domain],
|
||||||
|
@ -40,6 +41,12 @@ AC_ARG_WITH([letsencrypt-email],
|
||||||
[LETSENCRYPT_EMAIL=$withval],
|
[LETSENCRYPT_EMAIL=$withval],
|
||||||
[LETSENCRYPT_EMAIL=cominfra@a-lec.org])
|
[LETSENCRYPT_EMAIL=cominfra@a-lec.org])
|
||||||
|
|
||||||
|
AC_ARG_WITH([vm-ipv4-address],
|
||||||
|
[AS_HELP_STRING([--with-vm-ipv4-address=VM_IPV4_ADDRESS], [Use custom VM
|
||||||
|
IPv4 address. (default=192.168.1.117/24)])],
|
||||||
|
[VM_IPV4_ADDRESS=$withval],
|
||||||
|
[VM_IPV4_ADDRESS="192.168.1.117/24"])
|
||||||
|
|
||||||
AC_ARG_WITH([vm-ssh-public-key],
|
AC_ARG_WITH([vm-ssh-public-key],
|
||||||
[AS_HELP_STRING([--with-ssh-vm-public-key=VM_SSH_PUB_KEY], [Use custom VM
|
[AS_HELP_STRING([--with-ssh-vm-public-key=VM_SSH_PUB_KEY], [Use custom VM
|
||||||
SSH public key for use with 'guix deploy'. (default=\
|
SSH public key for use with 'guix deploy'. (default=\
|
||||||
|
@ -58,4 +65,5 @@ echo "Configuration options:"
|
||||||
echo "======================"
|
echo "======================"
|
||||||
echo "- Domain: $DOMAIN"
|
echo "- Domain: $DOMAIN"
|
||||||
echo "- Let's Encrypt email: $LETSENCRYPT_EMAIL"
|
echo "- Let's Encrypt email: $LETSENCRYPT_EMAIL"
|
||||||
|
echo "- VM IPv4 address: $VM_IPV4_ADDRESS"
|
||||||
echo "- VM SSH public key: $VM_SSH_PUB_KEY"
|
echo "- VM SSH public key: $VM_SSH_PUB_KEY"
|
||||||
|
|
|
@ -187,7 +187,7 @@ https://DOMAIN/
|
||||||
(static-networking
|
(static-networking
|
||||||
(addresses (list (network-address
|
(addresses (list (network-address
|
||||||
(device "eth0")
|
(device "eth0")
|
||||||
(value "192.168.10.37/24"))))
|
(value "VM_IPV4_ADDRESS"))))
|
||||||
(routes (list (network-route
|
(routes (list (network-route
|
||||||
(destination "default")
|
(destination "default")
|
||||||
(gateway "192.168.10.1"))))
|
(gateway "192.168.10.1"))))
|
||||||
|
|
Loading…
Reference in New Issue