Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Remove Docker Swarm documentation entirely
Jake Hulberg35a01869c536
diff --git a/docs/docs.json b/docs/docs.jsonindex 2ec1af73b4..db58b2d143 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -321,7 +321,6 @@"group": "Installation methods","pages": ["self-hosting/deployment-options/standalone-infisical",- "self-hosting/deployment-options/docker-swarm","self-hosting/deployment-options/docker-compose","self-hosting/deployment-options/kubernetes-helm","self-hosting/deployment-options/aws-native",@@ -539,7 +538,6 @@"group": "Agent","pages": ["integrations/platforms/infisical-agent",- "integrations/platforms/docker-swarm-with-agent","integrations/platforms/ecs-with-agent"]},diff --git a/docs/documentation/platform/secrets-mgmt/concepts/secrets-delivery.mdx b/docs/documentation/platform/secrets-mgmt/concepts/secrets-delivery.mdxindex df3885055a..d95a8b8831 100644--- a/docs/documentation/platform/secrets-mgmt/concepts/secrets-delivery.mdx+++ b/docs/documentation/platform/secrets-mgmt/concepts/secrets-delivery.mdx@@ -52,7 +52,6 @@ The agent runs as a lightweight background process and supports injecting secretYou can run the agent as a standalone binary, as a Docker sidecar, or embedded in automation scripts. It works well in environments like:- VMs that need secrets provisioned at startup.-- [Docker Swarm](/integrations/platforms/docker-swarm-with-agent) services using shared volumes.- [ECS tasks](/integrations/platforms/ecs-with-agent) using EFS for shared secret delivery.## CI/CD Pipelinesdiff --git a/docs/images/docker-swarm-secrets-complete.png b/docs/images/docker-swarm-secrets-complete.pngdeleted file mode 100644index 28b439445e..0000000000Binary files a/docs/images/docker-swarm-secrets-complete.png and /dev/null differdiff --git a/docs/images/self-hosting/deployment-options/docker-swarm/ha-proxy-ha.png b/docs/images/self-hosting/deployment-options/docker-swarm/ha-proxy-ha.pngdeleted file mode 100644index bfd2bb5200..0000000000Binary files a/docs/images/self-hosting/deployment-options/docker-swarm/ha-proxy-ha.png and /dev/null differdiff --git a/docs/integrations/platforms/docker-swarm-with-agent.mdx b/docs/integrations/platforms/docker-swarm-with-agent.mdxdeleted file mode 100644index 40d9986bbd..0000000000--- a/docs/integrations/platforms/docker-swarm-with-agent.mdx+++ /dev/null@@ -1,164 +0,0 @@-----title: 'Docker Swarm'-description: "Learn how to manage secrets in Docker Swarm services."------In this guide, we'll demonstrate how to use Infisical for managing secrets within Docker Swarm.-Specifically, we'll set up a sidecar container using the [Infisical Agent](/integrations/platforms/infisical-agent), which authenticates with Infisical to retrieve secrets and access tokens.-These secrets are then stored in a shared volume accessible by other services in your Docker Swarm.--## Prerequisites-- Infisical account-- Docker version 20.10.24 or newer-- Basic knowledge of Docker Swarm-- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) installed on your system-- Familiarity with the [Infisical Agent](/integrations/platforms/infisical-agent)--## Objective-Our goal is to deploy an Nginx instance in your Docker Swarm cluster, configured to display Infisical secrets on its landing page. This will provide hands-on experience in fetching and utilizing secrets from Infisical within Docker Swarm. The principles demonstrated here are also applicable to Docker Compose deployments.--<Steps>- <Step title="Cloning the Guide Assets Repository">- Start by cloning the [Infisical guide assets repository](https://github.com/Infisical/infisical-guides.git) from Github. This repository includes necessary assets for this and other Infisical guides. Focus on the `docker-swarm-with-agent` sub-directory, which we'll use as our working directory.- </Step>-- <Step title="Setting Up Authentication with Infisical">- To allow the agent to fetch your Infisical secrets, choose an authentication method for the agent. For this guide, we will use [Universal Auth](/documentation/platform/identities/universal-auth) for authentication. Follow the instructions [here](/documentation/platform/identities/universal-auth) to generate a client ID and client secret.- </Step>-- <Step title="Entering Universal Auth Credentials">- Copy the client ID and client secret obtained in the previous step into the `client-id` and `client-secret` text files, respectively.- </Step>-- <Step title="Configuring the Infisical Agent">- The Infisical Agent will authenticate using Universal Auth and retrieve secrets for rendering as specified in the template(s).- Adjust the `polling-interval` to control the frequency of secret updates.-- In the example template, the secrets are rendered as an HTML page, which will be set as Nginx's home page to demonstrate successful secret retrieval and utilization.-- <Tip>- Remember to add your project id, environment slug and path of corresponding Infisical project to the secret template.- </Tip>- <Tabs>- <Tab title="Agent Configuration">- ```yaml infisical-agent-config- infisical:- address: "https://app.infisical.com"- auth:- type: "universal-auth"- config:- client-id: "/run/secrets/infisical-universal-auth-client-id"- client-secret: "/run/secrets/infisical-universal-auth-client-secret"- remove_client_secret_on_read: false- sinks:- - type: "file"- config:- path: "/infisical-secrets/access-token"- templates:- - source-path: /run/secrets/nginx-home-page-template- destination-path: /infisical-secrets/index.html- config:- polling-interval: 60s- ```- <Info>- Some paths contain `/run/secrets/` because the contents of those files reside in a [Docker secret](https://docs.docker.com/engine/swarm/secrets/#how-docker-manages-secrets).- </Info>- </Tab>- <Tab title="Secret Template for Agent">- ```html nginx-home-page-template- <!DOCTYPE html>- <html lang="en">- <body>- <h1>This file is rendered by Infisical agent template engine</h1>- <p>Here are the secrets that have been fetched from Infisical and stored in your volume mount</p>- <ol>- {{- with secret "7df67a5f-d26a-4988-a375-7153c08149da" "dev" "/" }}- {{- range . }}- <li>{{ .Key }}={{ .Value }}</li>- {{- end }}- {{- end }}- </ol>- </body>- </html>- ```- </Tab>- </Tabs>- </Step>-- <Step title="Creating the Docker Compose File">- Define the `infisical-agent` and `nginx` services in your Docker Compose file. `infisical-agent` will handle secret retrieval and storage. These secrets are stored in a volume, accessible by other services like Nginx.-- ```yaml docker-compose.yaml- version: "3.1"-- services:- infisical-agent:- container_name: infisical-agnet- image: infisical/cli:0.18.0- command: agent --config=/run/secrets/infisical-agent-config- volumes:- - infisical-agent:/infisical-secrets- secrets:- - infisical-universal-auth-client-id- - infisical-universal-auth-client-secret- - infisical-agent-config- - nginx-home-page-template- networks:- - infisical_network-- nginx:- image: nginx:latest- ports:- - "80:80"- volumes:- - infisical-agent:/usr/share/nginx/html- networks:- - infisical_network-- volumes:- infisical-agent:-- secrets:- infisical-universal-auth-client-id:- file: ./client-id- infisical-universal-auth-client-secret:- file: ./client-secret- infisical-agent-config:- file: ./infisical-agent-config- nginx-home-page-template:- file: ./nginx-home-page-template--- networks:- infisical_network:- ```- </Step>-- <Step title="Initializing Docker Swarm">- ```- docker swarm init- ```- </Step>-- <Step title="Deploying the Docker Stack">- ```- docker stack deploy -c docker-compose.yaml agent-demo- ```- </Step>-- <Step title="Verifying Secret Consumption">- To confirm that secrets are properly rendered and accessible, navigate to `http://localhost`. You should see the Infisical secrets displayed on the Nginx landing page.-- - </Step>-- <Step title="Clean up">- ```- docker stack rm agent-demo- ```- </Step>-</Steps>--## Considerations-- Secret Updates: Applications that access secrets directly from the volume mount will receive updates in real-time, in accordance with the `polling-interval` set in agent config.-- In-Memory Secrets: If your application loads secrets into memory, the new secrets will be available to the application on the next deployment.diff --git a/docs/self-hosting/deployment-options/docker-compose.mdx b/docs/self-hosting/deployment-options/docker-compose.mdxindex 65b590dd11..43c8f460f7 100644--- a/docs/self-hosting/deployment-options/docker-compose.mdx+++ b/docs/self-hosting/deployment-options/docker-compose.mdx@@ -14,7 +14,7 @@ Learn how to deploy **Infisical** using Docker Compose. This method runs Infisic<Warning>This Docker Compose configuration is not designed for high-availability production scenarios.It includes just the essential components needed to set up an Infisical proof of concept (POC).- To run Infisical in a highly available manner, see the [Docker Swarm guide](/self-hosting/deployment-options/docker-swarm) or [Kubernetes guide](/self-hosting/deployment-options/kubernetes-helm).+ To run Infisical in a highly available manner, see the [Kubernetes guide](/self-hosting/deployment-options/kubernetes-helm).</Warning>## System Requirementsdiff --git a/docs/self-hosting/deployment-options/docker-swarm.mdx b/docs/self-hosting/deployment-options/docker-swarm.mdxdeleted file mode 100644index c7280d879a..0000000000--- a/docs/self-hosting/deployment-options/docker-swarm.mdx+++ /dev/null@@ -1,211 +0,0 @@-----title: "Docker Swarm"-description: "How to self-host Infisical with Docker Swarm (HA)."------# Self-Hosting Infisical with Docker Swarm--This guide will provide step-by-step instructions on how to self-host Infisical using Docker Swarm. This is particularly helpful for those wanting to self-host Infisical on premise while still maintaining high availability (HA) for the core Infisical components.-The guide will demonstrate a setup with three nodes, ensuring that the cluster can tolerate the failure of one node while remaining fully operational.--## Docker Swarm--[Docker Swarm](https://docs.docker.com/engine/swarm/) is a native clustering and orchestration solution for Docker containers.-It simplifies the deployment and management of containerized applications across multiple nodes, making it a great choice for self-hosting Infisical.--Unlike Kubernetes, which requires a deep understanding of the Kubernetes ecosystem, if you're accustomed to Docker and Docker Compose, you're already familiar with most of Docker Swarm.-For this reason, we suggest teams use Docker Swarm to deploy Infisical in a highly available and fault tolerant manner.--## Prerequisites-- Understanding of Docker Swarm-- Bare/Virtual Machines with Docker installed on each VM.-- Docker Swarm initialized on the VMs.--## Core Components for High Availability--The provided Docker stack includes the following core components to achieve high availability:--1. **Spilo**: [Spilo](https://github.com/zalando/spilo) is used to run PostgreSQL with [Patroni](https://github.com/zalando/patroni) for HA and automatic failover. It utilizes etcd for leader election of the PostgreSQL instances.--2. **Redis**: Redis is used for caching and is set up with Redis Sentinel for HA.-The stack includes three Redis replicas and three Redis Sentinel instances for monitoring and failover.--3. **Infisical**: Infisical is stateless, allowing for easy scaling and replication across multiple nodes.--4. **HAProxy**: HAProxy is used as a load balancer to distribute traffic to the PostgreSQL and Redis instances.-It is configured to perform health checks and route requests to the appropriate backend services.--## Node Failure Tolerance--To ensure Infisical is highly available and fault tolerant, it's important to choose the number of nodes in the cluster.-The following table shows the relationship between the number of nodes and the maximum number of nodes that can be down while the cluster continues to function:--| Total Nodes | Max Nodes Down | Min Nodes Required |-|-------------|----------------|-------------------|-| 1 | 0 | 1 |-| 2 | 0 | 2 |-| 3 | 1 | 2 |-| 4 | 1 | 3 |-| 5 | 2 | 3 |-| 6 | 2 | 4 |-| 7 | 3 | 4 |--The formula for calculating the minimum number of nodes required is: `floor(n/2) + 1`, where `n` is the total number of nodes.--This guide will demonstrate a setup with three nodes, which allows for one node to be down while the cluster remains operational. This fault tolerance applies to the following components:--- Redis Sentinel: With three Sentinel instances, one instance can be down, and the remaining two can still form a quorum to make decisions.-- Redis: With three Redis instances (one master and two replicas), one instance can be down, and the remaining two can continue to provide caching services.-- PostgreSQL: With three PostgreSQL instances managed by Patroni and etcd, one instance can be down, and the remaining two can maintain data consistency and availability.-- Manager Nodes: In a Docker Swarm cluster with three manager nodes, one manager node can be down, and the remaining two can continue to manage the cluster.-For the sake of simplicity, the example in this guide only contains one manager node.--It's important to note that while the cluster can tolerate the failure of one node in a three-node setup, it's recommended to have a minimum of three nodes to ensure high availability.-With two nodes, the failure of a single node can result in a loss of quorum and potential downtime.--## Docker Deployment Stack Overview--The [Docker stack file](https://github.com/Infisical/infisical/tree/main/docker-swarm) used in this guide defines the services and their configurations for deploying Infisical in a highly available manner. The main components of this stack are as follows.--1. **HAProxy**: The HAProxy service is configured to expose ports for accessing PostgreSQL (5433 for the master, 5434 for replicas), Redis master (6379), and the Infisical backend (8080). It uses a config file (`haproxy.cfg`) to define the load balancing and health check rules.--2. **Infisical**: The Infisical backend service is deployed with the latest PostgreSQL-compatible image. It is connected to the `infisical` network and uses secrets for environment variables.--3. **etcd**: Three etcd instances (etcd1, etcd2, etcd3) are deployed, one on each node, to provide distributed key-value storage for leader election and configuration management.--4. **Spilo**: Three Spilo instances (spolo1, spolo2, spolo3) are deployed, one on each node, to run PostgreSQL with Patroni for high availability. They are connected to the `infisical` network and use persistent volumes for data storage.--5. **Redis**: Three Redis instances (redis_replica0, redis_replica1, redis_replica2) are deployed, one on each node, with redis_replica0 acting as the master. They are connected to the `infisical` network.--6. **Redis Sentinel**: Three Redis Sentinel instances (redis_sentinel1, redis_sentinel2, redis_sentinel3) are deployed, one on each node, to monitor and manage the Redis instances. They are connected to the `infisical` network.--## Deployment instructions--<Steps>- <Step title="Install Docker on nodes">- Run the following on each node to install the Docker engine.-- ```- curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh- ```- </Step>- <Step title="Initialize Docker Swarm on one of the VMs by running the following command">- ```- docker swarm init- ```-- Replace `<MANAGER_NODE_IP>` with the IP address of the VM that will serve as the manager node. Remember to copy the join token returned by the this init command.-- <Tip>- For the sake of simplicity, we only use one manager node in this example deployment. However, in production settings, we recommended you have at least 3 manager nodes.- </Tip>- </Step>-- <Step title="On the other VMs, join the Docker Swarm by running the command provided by the manager node">- ```- docker swarm join --token <JOIN_TOKEN> <MANAGER_NODE_IP>:2377- ```-- Replace `<JOIN_TOKEN>` with the token provided by the manager node during initialization.-- </Step>-- <Step title="Label the nodes with `node.labels.name` to specify their roles.">- Labels on nodes will help us select where stateful components such as Postgres and Redis are deployed on. To label nodes, follow the steps below.-- ```- docker node update --label-add name=node1 <NODE1_ID>- docker node update --label-add name=node2 <NODE2_ID>- docker node update --label-add name=node3 <NODE3_ID>- ```-- Replace `<NODE1_ID>`, `<NODE2_ID>`, and `<NODE3_ID>` with the respective node IDs.- To view the list of nodes and their ids, run the following on the manager node `docker node ls`.-- </Step>-- <Step title="Copy deployment assets to manager node">- Copy the Docker stack YAML file, HAProxy configuration file and example `.env` file to the manager node. Ensure that all 3 files are placed in the same file directory.- - [Docker stack file](https://github.com/Infisical/infisical/blob/main/docker-swarm/stack.yaml) (rename to infisical-stack.yaml)- - [HA configuration file](https://github.com/Infisical/infisical/blob/main/docker-swarm/haproxy.cfg) (rename to haproxy.cfg)- - [Example .env file](https://github.com/Infisical/infisical/blob/main/docker-swarm/.env-example) (rename to .env)- </Step>-- <Step title="Deploy stack">-- ```- docker stack deploy -c infisical-stack.yaml infisical- ```- </Step>-- <Step title="Check service status">- ```plain- $ docker service ls- ID NAME MODE REPLICAS IMAGE PORTS- 4kzq3ub8qgn9 infisical_etcd1 replicated 1/1 ghcr.io/zalando/spilo-16:3.2-p2- tqx9t82bn8d9 infisical_etcd2 replicated 1/1 ghcr.io/zalando/spilo-16:3.2-p2- t8vbkrasy8fz infisical_etcd3 replicated 1/1 ghcr.io/zalando/spilo-16:3.2-p2- 77iei42fcf6q infisical_haproxy global 4/4 haproxy:latest *:5002-5003->5433-5434/tcp, *:6379->6379/tcp, *:7001->7000/tcp, *:8080->8080/tcp- jaewzqy8md56 infisical_infisical replicated 5/5 infisical/infisical:v0.60.1-postgres- 58w4zablfbtb infisical_redis_replica0 replicated 1/1 bitnami/redis:6.2.10- w4yag2whq0un infisical_redis_replica1 replicated 1/1 bitnami/redis:6.2.10- w03mriy0jave infisical_redis_replica2 replicated 1/1 bitnami/redis:6.2.10- ppo6rk47hc9t infisical_redis_sentinel1 replicated 1/1 bitnami/redis-sentinel:6.2.10- ub29vd0lnq7f infisical_redis_sentinel2 replicated 1/1 bitnami/redis-sentinel:6.2.10- szg3yky7yji2 infisical_redis_sentinel3 replicated 1/1 bitnami/redis-sentinel:6.2.10- eqtocpf5tiy0 infisical_spolo1 replicated 1/1 ghcr.io/zalando/spilo-16:3.2-p2- 3lznscvk7k5t infisical_spolo2 replicated 1/1 ghcr.io/zalando/spilo-16:3.2-p2- v04ml7rz2j5q infisical_spolo3 replicated 1/1 ghcr.io/zalando/spilo-16:3.2-p2- ```- </Step>-- <Step title="View service status">- - To view the health of services in your Infisical cluster, visit port `<NODE-IP>:7001` of any node in your Docker swarm.- This port will expose the HA Proxy stats.-- Run the following command to view the IPs of the nodes in your docker swarm.-- ```plain- $ docker node ls- ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION- 0jnegl4gpo235l66nglcwc07t localhost Ready Active 26.0.2- no1a7zwj88057k73m196ulkq6 * localhost Ready Active Leader 26.0.2- wcb2x27w3tq7ht4v1h7ke49qk localhost Ready Active 26.0.2- zov5q7uop7wpxc2ndz712v9oa localhost Ready Active 26.0.2- ```-- <Info>- The stats page may take 1-2 minutes to become accessible.- </Info>- </Step>-- <Step title="Initialize Infisical">- - Once all expected services are up and running, visit `<NODE-IP>:8080` of any node in the swarm. This will take you to the Infisical configuration page.- </Step>-- </Steps>--## FAQ-<Accordion title="How do I scale Infisical cluster further?" defaultOpen="true">- To further scale and make the system more resilient, you can add more nodes to the Docker Swarm and update the stack configuration accordingly:-- 1. Add new VMs and join them to the Docker Swarm as worker nodes.-- 2. Update the Docker stack YAML file to include the new nodes in the `deploy` section of the relevant services, specifying the appropriate `node.labels.name` constraints.-- 3. Update the HAProxy configuration file (`haproxy.cfg`) to include the new nodes in the backend sections for PostgreSQL and Redis.-- 4. Redeploy the updated stack using the `docker stack deploy` command.-- Note that the database containers (PostgreSQL) are stateful and cannot be simply replicated. Instead, one database instance is deployed per node to ensure data consistency and avoid conflicts.--</Accordion>--<Accordion title="How do I configure backups for Postgres and Redis?">-Native tooling for scheduled backups of Postgres and Redis is currently in development.-In the meantime, we recommend using a variety of open-source tools available for this purpose.-For Postgres, [Spilo](https://github.com/zalando/spilo) provides built-in support for scheduled data dumps.-You can explore other third party tools for managing db backups, one such tool is [docker-db-backup](https://github.com/tiredofit/docker-db-backup).-</Accordion>diff --git a/docs/self-hosting/overview.mdx b/docs/self-hosting/overview.mdxindex de841e63d4..4de59c66bf 100644--- a/docs/self-hosting/overview.mdx+++ b/docs/self-hosting/overview.mdx@@ -40,14 +40,6 @@ Choose from a number of deployment options listed below to get started.>Install Infisical using our Docker Compose template.</Card>- <Card- title="Docker Swarm"- color="#000000"- icon="docker"- href="./deployment-options/docker-swarm"- >- Install Infisical using our Docker Swarm template.- </Card></CardGroup><CardGroup cols={2}>