diff --git a/docs/getting-started/introduction.mdx b/docs/getting-started/introduction.mdx index db69899bc..d8f37bddb 100644 --- a/docs/getting-started/introduction.mdx +++ b/docs/getting-started/introduction.mdx @@ -2,7 +2,7 @@ title: "Introduction" --- -Infisical is an [open-source](https://opensource.com/resources/what-open-source), [end-to-end encrypted](https://en.wikipedia.org/wiki/End-to-end_encryption) secret management platform that enables teams to easily manage and sync their environment variables. +Infisical is an [open-source](https://opensource.com/resources/what-open-source), [end-to-end encrypted](https://en.wikipedia.org/wiki/End-to-end_encryption) secret management platform that enables teams to easily manage and sync secrets like API keys, database credentials, and environment variables. Start syncing environment variables with [Infisical Cloud](https://app.infisical.com) or learn how to [host Infisical](/self-hosting/overview) yourself. @@ -13,7 +13,7 @@ Start syncing environment variables with [Infisical Cloud](https://app.infisical icon="timer" color="#ea5a0c" > - Tour Infisical in a few minutes + Learn about Infisical and how to fetch secrets in minutes Install the CLI to inject secrets into apps and infra. diff --git a/docs/getting-started/introduction2.mdx b/docs/getting-started/introduction2.mdx new file mode 100644 index 000000000..4835f4b61 --- /dev/null +++ b/docs/getting-started/introduction2.mdx @@ -0,0 +1,81 @@ +--- +title: "Introduction" +--- + +Infisical is an [open-source](https://opensource.com/resources/what-open-source), [end-to-end encrypted](https://en.wikipedia.org/wiki/End-to-end_encryption) secret management platform that enables teams to easily manage and sync their environment variables. + +Start syncing environment variables with [Infisical Cloud](https://app.infisical.com) or learn how to [host Infisical](/self-hosting/overview) yourself. + +## Learn about Infisical + + + Store secrets like API keys, database credentials, environment variables with Infisical + + +## Integrate with Infisical + + + + Fetch secrets for any programming language on demand + + + Inject secrets into any application process/environment + + + Inject secrets into Docker containers + + + Fetch and save secrets as native Kubernetes secrets + + + +## Resources + + + + Tour Infisical in a few minutes + + + Install the CLI to inject secrets into apps and infra. + + + Install an SDK into your app to fetch secrets. + + + Learn how to configure and deploy Infisical. + + + + + Explore integrations for Docker, AWS, Heroku, etc. + diff --git a/docs/getting-started/quickstarts/cli.mdx b/docs/getting-started/quickstarts/cli.mdx index ed5404851..d43a3537a 100644 --- a/docs/getting-started/quickstarts/cli.mdx +++ b/docs/getting-started/quickstarts/cli.mdx @@ -2,11 +2,11 @@ title: "CLI" --- -The CLI is commonly used in local development instead of `.env` files to inject secrets from the Infisical platform into any framework including [Next.js](/integrations/frameworks/nextjs), [Express](/integrations/frameworks/express), [Flask](/integrations/frameworks/flask), [Ruby on Rails](/integrations/frameworks/rails), [Laravel](/integrations/frameworks/laravel) and [more](/integrations/overview) as environment variables. +The Infisical CLI is used in local development instead of `.env` files to fetch and inject secrets from the Infisical platform into any framework including [Next.js](/integrations/frameworks/nextjs), [Express](/integrations/frameworks/express), [Flask](/integrations/frameworks/flask), [Ruby on Rails](/integrations/frameworks/rails), [Laravel](/integrations/frameworks/laravel) and [more](/integrations/overview) as environment variables. -Prerequisites: +Prerequisites: -- Have a project with secrets ready in [Infisical Cloud](https://app.infisical.com) +- Have a project with secrets ready in [Infisical Cloud](https://app.infisical.com). ## Installation @@ -113,6 +113,23 @@ $ infisical run -- [your application start command] Your app should now be running with the secrets from Infisical injected as environment variables. -Resources: +CLI framework resources: -- [List of confirmed frameworks](/integrations/overview) \ No newline at end of file +- [Express/Koa/Fastify](/integrations/frameworks/express) +- [NestJS](/integrations/frameworks/nestjs) +- [Fiber](/integrations/frameworks/fiber) +- [Django](/integrations/frameworks/django) +- [Flask](/integrations/frameworks/flask) +- [Laravel](/integrations/frameworks/laravel) +- [Ruby on Rails](/integrations/frameworks/rails) +- [React](/integrations/frameworks/react) +- [Vue](/integrations/frameworks/vue) +- [Next.js](/integrations/frameworks/nextjs) +- [SvelteKit](/integrations/frameworks/sveltekit) +- [Nuxt](/integrations/frameworks/nuxt) +- [Gatsby](/integrations/frameworks/gatsby) +- [Remix](/integrations/frameworks/remix) +- [Vite](/integrations/frameworks/vite) +- [Fiber](/integrations/frameworks/fiber) + +Not seeing a framework? Throw in a [request](https://github.com/Infisical/infisical/issues). \ No newline at end of file diff --git a/docs/getting-started/quickstarts/docker.mdx b/docs/getting-started/quickstarts/docker.mdx index 5f144292a..3c8a2b10e 100644 --- a/docs/getting-started/quickstarts/docker.mdx +++ b/docs/getting-started/quickstarts/docker.mdx @@ -1,4 +1,181 @@ --- title: "Docker" -description: "Inject secrets into your Docker containers" --- + +The [Infisical CLI](/cli/overview) can be added to Dockerfiles to fetch secrets from Infisical and make them available as environment variables within containers at runtime. + +Prerequisites: + +- Have a project with secrets ready in [Infisical Cloud](https://app.infisical.com). +- Create an [Infisical Token](/getting-started/dashboard/token) scoped to an environment in your project in Infisical. + + + + + + ## Dockerfile Modification + + Follow the instruction for your specific Linux distrubtion to add the Infisical CLI to your Dockerfile. + + + + ```dockerfile + RUN apk add --no-cache bash curl && curl -1sLf \ + 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash \ + && apk add infisical + ``` + + + + ```dockerfile + RUN curl -1sLf \ + 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.rpm.sh' | sh \ + && yum install -y infisical + ``` + + + ```dockerfile + RUN apt-get update && apt-get install -y bash curl && curl -1sLf \ + 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' | bash \ + && apt-get update && apt-get install -y infisical + ``` + + + + Next, modify the start command of your Dockerfile: + + ```dockerfile + CMD ["infisical", "run", "--", "[your service start command]"] + ``` + + ## Launch + + Spin up your container with the `docker run` command and feed in your Infisical Token. + + ```console + docker run --env INFISICAL_TOKEN= + ``` + + Your container should now be running with the secrets from Infisical available inside as environment variables. + + ## Example Dockerfile + + ```dockerfile + # Select your base image (based on your Linux distribution, e.g., Alpine, Debian, Ubuntu, etc.) + FROM alpine + + # Add the Infisical CLI to your Dockerfile (choose the appropriate block based on your base image) + RUN apk add --no-cache bash curl && curl -1sLf \ + 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash \ + && apk add infisical + + # Install any additional dependencies or packages your service requires + # RUN + + # Copy your service files to the container + COPY . /app + + # Set the working directory + WORKDIR /app + + # Modify the start command of your Dockerfile + CMD ["infisical", "run", "--", "[your service start command]"] + ``` + + + + + + ## Dockerfile Modifications + + Follow the instruction for your specific Linux distributions to add the Infisical CLI to your Dockerfiles. + + + + ```dockerfile + RUN apk add --no-cache bash curl && curl -1sLf \ + 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash \ + && apk add infisical + ``` + + + + ```dockerfile + RUN curl -1sLf \ + 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.rpm.sh' | sh \ + && yum install -y infisical + ``` + + + ```dockerfile + RUN apt-get update && apt-get install -y bash curl && curl -1sLf \ + 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' | bash \ + && apt-get update && apt-get install -y infisical + ``` + + + + Next, modify the start commands of your Dockerfiles: + + ```dockerfile + CMD ["infisical", "run", "--", "[your service start command]"] + ``` + + ## Example Dockerfile + + ```dockerfile + # Select your base image (based on your Linux distribution, e.g., Alpine, Debian, Ubuntu, etc.) + FROM alpine + + # Add the Infisical CLI to your Dockerfile (choose the appropriate block based on your base image) + RUN apk add --no-cache bash curl && curl -1sLf \ + 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash \ + && apk add infisical + + # Install any additional dependencies or packages your service requires + # RUN + + # Copy your service files to the container + COPY . /app + + # Set the working directory + WORKDIR /app + + # Modify the start command of your Dockerfile + CMD ["infisical", "run", "--", "[your service start command]"] + ``` + + ## Docker Compose File Modification + + For each service you want to inject secrets into, set an environment variable called `INFISICAL_TOKEN` equal to a unique identifier variable. For example: + + ```yaml + services: + api: + build: . + image: example-service-2 + environment: + - INFISICAL_TOKEN=${INFISICAL_TOKEN_FOR_API} + ... + ``` + + ## Export shell variables + + Next, set the shell variables you defined in your compose file. Continuing from the previous example: + + ```console + export INFISICAL_TOKEN_FOR_API= + ``` + + ## Launch + + Spin up your containers with the `docker-compose up` command. + + ```console + docker-compose up + ``` + + Your containers should now be running with the secrets from Infisical available inside as environment variables. + + + \ No newline at end of file diff --git a/docs/getting-started/quickstarts/k8s.mdx b/docs/getting-started/quickstarts/k8s.mdx deleted file mode 100644 index 70c04b838..000000000 --- a/docs/getting-started/quickstarts/k8s.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: "Kubernetes" -description: "Fetch and save secrets as native Kubernetes secrets" ---- diff --git a/docs/getting-started/quickstarts/kubernetes.mdx b/docs/getting-started/quickstarts/kubernetes.mdx new file mode 100644 index 000000000..5929d92e3 --- /dev/null +++ b/docs/getting-started/quickstarts/kubernetes.mdx @@ -0,0 +1,70 @@ +--- +title: "Kubernetes" +--- + +The Infisical Secrets Operator is a Kubernetes controller that retrieves secrets from Infisical and stores them in a designated cluster. +It uses an `InfisicalSecret` resource to specify authentication and storage methods. +The operator continuously updates secrets and can also reload dependent deployments automatically. + +Prerequisites: + +- Have a project with secrets ready in [Infisical Cloud](https://app.infisical.com). + +## Installation + +Follow the instructions for either [Helm](https://helm.sh/) or [kubectl](https://github.com/kubernetes/kubectl) to install the Infisical Secrets Operator. + + + + Install the Infisical Helm repository + + ```console + helm repo add infisical-helm-charts 'https://dl.cloudsmith.io/public/infisical/helm-charts/helm/charts/' + + helm repo update + ``` + + Install the Helm chart + ```console + helm install --generate-name infisical-helm-charts/secrets-operator + ``` + + + + The operator will be installed in `infisical-operator-system` namespace + ``` + kubectl apply -f https://raw.githubusercontent.com/Infisical/infisical/main/k8-operator/kubectl-install/install-secrets-operator.yaml + ``` + + + +## Sync Infisical Secrets to your cluster +To retrieve secrets from an Infisical project and save them as native Kubernetes secrets within a specific namespace, utilize the `InfisicalSecret` custom resource definition (CRD). +This resource can be created after installing the Infisical operator. For each new managed secret, you will need to create a new InfisicalSecret CRD. + +```yaml +apiVersion: secrets.infisical.com/v1alpha1 +kind: InfisicalSecret +metadata: + # Name of of this InfisicalSecret resource + name: infisicalsecret-sample +spec: + # The host that should be used to pull secrets from. If left empty, the value specified in Global configuration will be used + hostAPI: https://app.infisical.com/api + authentication: + serviceToken: # <-- option 1 + serviceTokenSecretReference: + secretName: service-token + secretNamespace: option + serviceAccount: # <-- method 2 + serviceAccountSecretReference: + secretName: service-account + secretNamespace: default + projectId: "6439ec224cfbf7ea2a95b651" + environmentName: "dev" + managedSecretReference: + secretName: managed-secret # <-- the name of kubernetes secret that will be created + secretNamespace: default # <-- where the kubernetes secret that will be created +``` + + diff --git a/docs/getting-started/quickstarts/platform.mdx b/docs/getting-started/quickstarts/platform.mdx index 0bf2aedfe..5fba41815 100644 --- a/docs/getting-started/quickstarts/platform.mdx +++ b/docs/getting-started/quickstarts/platform.mdx @@ -4,17 +4,11 @@ title: "Platform" Infisical is an [open-source](https://opensource.com/resources/what-open-source), [end-to-end encrypted](https://en.wikipedia.org/wiki/End-to-end_encryption) secret management platform that enables teams to easily store, manage, and sync secrets like API keys, database credentials, and environment variables across their apps and infrastructure. -This quickstart provides an overview of the core and useful functionalities offered by the platform. - -## Usage - -Infisical can be used on [Infisical Cloud](https://app.infisical.com/login) (our hosted/managed solution) or [self-hosted on your own infrastructure](/self-hosting/overview). - -Inside Infisical, you'll find that every secret belongs to a project that in turn belongs to an organization. +This quickstart provides an overview of the functionalities offered by Infisical. ## Projects -Project houses secrets for applications. +Projects house secrets for applications. ### Secrets Overview @@ -58,4 +52,6 @@ At the organization-level, you can add/remove members and manage their access to ![organization name modal open](../../images/dashboard-name-modal-organization.png) ![organization name modal open](../../images/organization.png) -That's it for the platform quickstart! — We encourage you to continue exploring the documentation to gain a deeper understanding of the extensive features and functionalities that Infisical has to offer. \ No newline at end of file +That's it for the platform quickstart! — We encourage you to continue exploring the documentation to gain a deeper understanding of the extensive features and functionalities that Infisical has to offer. + +Next, head back to [Quickstart > Overview](/getting-started/quickstarts/overview) to explore ways to fetch secrets from Infisical to your apps and infrastructure. \ No newline at end of file diff --git a/docs/getting-started/quickstarts/sdks.mdx b/docs/getting-started/quickstarts/sdks.mdx index 6da93d581..f7dbae6ab 100644 --- a/docs/getting-started/quickstarts/sdks.mdx +++ b/docs/getting-started/quickstarts/sdks.mdx @@ -6,8 +6,8 @@ From local development to production, Infisical's language-specific SDKs provide Prerequisites: -- Have a project with secrets ready in [Infisical Cloud](https://app.infisical.com) -- Create an [Infisical Token](/getting-started/dashboard/token) scoped to an environment in your project. +- Have a project with secrets ready in [Infisical Cloud](https://app.infisical.com). +- Create an [Infisical Token](/getting-started/dashboard/token) scoped to an environment in your project in Infisical. @@ -77,8 +77,6 @@ Prerequisites: ``` This example demonstrates how to use the Infisical Node SDK with an Express application. The application retrieves a secret named "NAME" and responds to requests with a greeting that includes the secret value. - - For a comprehensive overview, refer to the complete [documentation for the Node SDK](/sdks/languages/node). @@ -127,8 +125,6 @@ Prerequisites: ``` This example demonstrates how to use the Infisical Python SDK with a Flask application. The application retrieves a secret named "NAME" and responds to requests with a greeting that includes the secret value. - - For a comprehensive overview, please refer to the complete [documentation for the Python SDK](/sdks/languages/python). We're currently working on SDKs for other languages. Follow the GitHub issue for your needed language below: @@ -140,4 +136,9 @@ Prerequisites: Missing a language? Throw in a [request](https://github.com/Infisical/infisical/issues). - \ No newline at end of file + + +Resources: + +- [Documentation for Node](https://github.com/Infisical/infisical-node) +- [Documentation for Python](https://github.com/Infisical/infisical-python) \ No newline at end of file diff --git a/docs/mint.json b/docs/mint.json index 5aa1304d2..6986e2499 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -80,6 +80,7 @@ "group": "Overview", "pages": [ "getting-started/introduction", + "getting-started/introduction2", { "group": "Quickstarts", "pages": [ @@ -88,7 +89,7 @@ "getting-started/quickstarts/sdks", "getting-started/quickstarts/cli", "getting-started/quickstarts/docker", - "getting-started/quickstarts/k8s" + "getting-started/quickstarts/kubernetes" ] }, "getting-started/features" diff --git a/docs/sdks/overview.mdx b/docs/sdks/overview.mdx index 7a6512356..8c38498b5 100644 --- a/docs/sdks/overview.mdx +++ b/docs/sdks/overview.mdx @@ -5,10 +5,10 @@ description: "How to use Infisical SDKs to fetch back secrets for your app" Whether it be for local development or production, Infisical SDKs provide the easiest way for your app to fetch back secrets using an [Infisical Token](/getting-started/dashboard/token). -We currently have the [Node SDK](/sdks/languages/node) and [Python SDK](/sdks/languages/python) available with more language SDKs coming out soon: +We currently have the [Node SDK](https://github.com/Infisical/infisical-node) and [Python SDK](https://github.com/Infisical/infisical-python) available with more language SDKs coming out soon: -- [Node](/sdks/languages/node) -- [Python](/sdks/languages/python) +- [Node](https://github.com/Infisical/infisical-node) +- [Python](https://github.com/Infisical/infisical-python) - [Java](/sdks/languages/java) - [Ruby](/sdks/languages/ruby) - [Go](/sdks/languages/go)