Skip to content

Commit

Permalink
provisioning updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Aug 23, 2024
1 parent 24a7549 commit 1efc1ff
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test:
go test ./...

install-aws:
cd provisioning && AWS_PROFILE=in4it-vpn-server packer build -var-file=whitelist.pkr.hcl packer-amd64.pkr.hcl
cd provisioning && AWS_PROFILE=in4it-vpn-server AWS_REGION=us-east-1 packer build -var-file=whitelist.pkr.hcl packer-amd64.pkr.hcl

install-gcp:
cd provisioning && packer build packer-gcp-amd64.pkr.hcl
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# VPN Server

## Usage
You can launch the WireGuard® based VPN server for production use from the [AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-dymnyb6a2pq72), the [Azure Marketplace](
You can launch the WireGuard® based VPN server for production use from the [AWS Marketplace (License Included)](https://aws.amazon.com/marketplace/pp/prodview-dymnyb6a2pq72), the [AWS Marketplace (BYOL)](https://aws.amazon.com/marketplace/pp/prodview-5somq325qrwss), the [Azure Marketplace](
https://azuremarketplace.microsoft.com/en-us/marketplace/apps/in4it.vpn-server), the [DigitalOcean Marketplace](https://marketplace.digitalocean.com/apps/vpn-server), the [GCP Marketplace](https://console.cloud.google.com/marketplace/product/in4it-public/vpn-server) or install the VPN manually. Personal use is allowed under BSL (Business Source License).

## Features
Expand Down
16 changes: 13 additions & 3 deletions provisioning/packer-amd64.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@ variable "ami_users" {

locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }

source "amazon-ebs" "autogenerated_1" {
data "amazon-ami" "ubuntu" {
filters = {
virtualization-type = "hvm"
name = "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*"
root-device-type = "ebs"
}
owners = ["099720109477"]
most_recent = true
}

source "amazon-ebs" "vpn-server" {
ami_name = "in4it-vpn-server-${local.timestamp}"
ami_users = var.ami_users
instance_type = "m7a.medium"
Expand All @@ -31,12 +41,12 @@ source "amazon-ebs" "autogenerated_1" {
profile = "${var.aws_profile}"
region = "us-east-1"
ami_regions = ["eu-west-1"]
source_ami = "ami-0f2a1bb3c242fe285"
source_ami = data.amazon-ami.ubuntu.id
ssh_username = "ubuntu"
}

build {
sources = ["source.amazon-ebs.autogenerated_1"]
sources = ["source.amazon-ebs.vpn-server"]

provisioner "file" {
destination = "/tmp/configmanager-linux-amd64"
Expand Down
5 changes: 4 additions & 1 deletion provisioning/scripts/install_vpn.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/bin/bash
ARCHITECTURE=$(uname -m)
ARCHITECTURE=$(uname -m | sed s/x86_64/amd64/)
if [ -e "/usr/bin/cloud-init" ] ; then
cloud-init status --wait
fi

set -ex

apt-get -y update
apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' full-upgrade
apt-get install -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' wireguard
Expand Down
5 changes: 0 additions & 5 deletions webapp/README.md

This file was deleted.

0 comments on commit 1efc1ff

Please sign in to comment.