common | ||
pangolin-24-04 | ||
.gitignore | ||
DEPLOYMENT.md | ||
README.md |
Pangolin DigitalOcean Marketplace 1-Click App
This repository contains Packer templates and scripts to build a DigitalOcean Marketplace 1-Click App for Pangolin, a self-hosted tunneled mesh reverse proxy with access control.
TL;DR - Quick Build
Packer will create a DigitalOcean droplet, install Pangolin and its dependencies, then save the system as a reusable image (snapshot) for the Marketplace.
# Install Packer plugin
packer init plugins.pkr.hcl
# Set API token
export DIGITALOCEAN_API_TOKEN=your_digitalocean_token
# Validate and build
packer validate pangolin-24-04/template.json
packer build pangolin-24-04/template.json
Prerequisites
- Packer (v1.7.0 or higher)
- DigitalOcean Personal Access Token
- The DigitalOcean Packer plugin (for Packer 1.7.0+)
Directory Structure
pangolin-marketplace/
├── common/
│ ├── files/
│ │ └── var/
│ │ └── lib/
│ │ └── digitalocean/
│ └── scripts/
│ ├── 010-docker.sh
│ ├── 018-force-ssh-logout.sh
│ ├── 020-application-tag.sh
│ └── 900-cleanup.sh
└── pangolin-24-04/
├── scripts/
│ ├── 010-pangolin.sh
│ └── 020-firewall.sh
└── template.json
Building the Image
-
Clone this repository:
git clone https://github.com/your-username/pangolin-marketplace.git cd pangolin-marketplace
-
For Packer 1.7.0+, initialize the DigitalOcean plugin:
# Create plugins.pkr.hcl file cat > plugins.pkr.hcl << EOF packer { required_plugins { digitalocean = { version = ">= 1.4.1" source = "github.com/digitalocean/digitalocean" } } } EOF # Initialize plugins packer init plugins.pkr.hcl
-
Set your DigitalOcean API token as an environment variable:
export DIGITALOCEAN_API_TOKEN=your_digitalocean_token
-
Create the necessary directory structure if it doesn't already exist:
mkdir -p common/files/var/lib/digitalocean
-
Validate the template:
packer validate pangolin-24-04/template.json
-
Build the image:
packer build pangolin-24-04/template.json
-
The build will output a snapshot ID. Note this ID for submission to the Marketplace.
Submitting to the DigitalOcean Marketplace
-
Log in to the DigitalOcean Vendor Portal.
-
Submit your app with the following details:
- Name: Pangolin
- Version: 1.2.0
- Software Included:
- Pangolin 1.2.0
- Docker CE (latest)
- Image ID: [The snapshot ID from the Packer build]
-
Complete the rest of the submission form with relevant details about Pangolin.
For End Users
Once the image is approved and available in the Marketplace, users can deploy Pangolin by:
- Selecting "Pangolin" from the DigitalOcean Marketplace.
- Creating a Droplet based on the image.
- Pointing a domain to the Droplet's IP address.
- SSH'ing into the Droplet, where they'll be guided through initial setup.
Troubleshooting
If you encounter issues during the build:
-
Add the
-debug
flag to prompt for confirmation at each build step:packer build -debug pangolin-24-04/template.json
-
Use the
-on-error=ask
flag to debug failed builds:packer build -on-error=ask pangolin-24-04/template.json
-
Enable verbose logging:
PACKER_LOG=1 packer build pangolin-24-04/template.json
License
Pangolin is dual licensed under the AGPL-3 and the Fossorial Commercial license.