Complete preliminary new quickstarts

This commit is contained in:
Tuan Dang
2023-04-29 14:39:22 +03:00
parent e5cb0cbca3
commit bced5d0151
10 changed files with 371 additions and 32 deletions

View File

@@ -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
</Card>
<Card href="/cli/overview" title="CLI" icon="square-terminal" color="#16a34a">
Install the CLI to inject secrets into apps and infra.

View File

@@ -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
<Card
href="/getting-started/quickstarts/platform"
title="Platform"
icon="laptop"
color="#dc2626"
>
Store secrets like API keys, database credentials, environment variables with Infisical
</Card>
## Integrate with Infisical
<CardGroup cols={2}>
<Card
title="SDKs"
href="/getting-started/quickstarts/sdks"
icon="boxes-stacked"
color="#3c8639"
>
Fetch secrets for any programming language on demand
</Card>
<Card href="/getting-started/quickstarts/cli" title="Command Line Interface" icon="square-terminal" color="#3775a9">
Inject secrets into any application process/environment
</Card>
<Card href="/getting-started/quickstarts/docker" title="Docker" icon="docker" color="#0078d3">
Inject secrets into Docker containers
</Card>
<Card
href="/getting-started/quickstarts/k8s"
title="Kubernetes"
icon="server"
color="#3775a9"
>
Fetch and save secrets as native Kubernetes secrets
</Card>
</CardGroup>
## Resources
<CardGroup cols={2}>
<Card
title="Quickstarts"
href="/getting-started/quickstarts/overview"
icon="timer"
color="#ea5a0c"
>
Tour Infisical in a few minutes
</Card>
<Card href="/cli/overview" title="CLI" icon="square-terminal" color="#16a34a">
Install the CLI to inject secrets into apps and infra.
</Card>
<Card href="/sdks/overview" title="SDKs" icon="puzzle-piece" color="#16a34a">
Install an SDK into your app to fetch secrets.
</Card>
<Card
href="/self-hosting/overview"
title="Self-hosting"
icon="server"
color="#0285c7"
>
Learn how to configure and deploy Infisical.
</Card>
</CardGroup>
<Card
href="/integrations/overview"
title="Integrations"
icon="plug"
color="#dc2626"
>
Explore integrations for Docker, AWS, Heroku, etc.
</Card>

View File

@@ -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)
- [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).

View File

@@ -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.
<Tabs>
<Tab title="Docker">
## Dockerfile Modification
Follow the instruction for your specific Linux distrubtion to add the Infisical CLI to your Dockerfile.
<Tabs>
<Tab title="Alpine">
```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
```
</Tab>
<Tab title="RedHat/CentOs/Amazon-linux">
```dockerfile
RUN curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.rpm.sh' | sh \
&& yum install -y infisical
```
</Tab>
<Tab title="Debian/Ubuntu">
```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
```
</Tab>
</Tabs>
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_infisical_token> <DOCKER-IMAGE>
```
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 <additional commands for your service>
# 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]"]
```
</Tab>
<Tab title="Docker Compose">
## Dockerfile Modifications
Follow the instruction for your specific Linux distributions to add the Infisical CLI to your Dockerfiles.
<Tabs>
<Tab title="Alpine">
```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
```
</Tab>
<Tab title="RedHat/CentOs/Amazon-linux">
```dockerfile
RUN curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.rpm.sh' | sh \
&& yum install -y infisical
```
</Tab>
<Tab title="Debian/Ubuntu">
```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
```
</Tab>
</Tabs>
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 <additional commands for your service>
# 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=<your_infisical_token>
```
## 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.
</Tab>
</Tabs>

View File

@@ -1,4 +0,0 @@
---
title: "Kubernetes"
description: "Fetch and save secrets as native Kubernetes secrets"
---

View File

@@ -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.
<Tabs>
<Tab title="Helm">
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
```
</Tab>
<Tab title="Kubectl">
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
```
</Tab>
</Tabs>
## 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
```

View File

@@ -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.
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.

View File

@@ -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.
<Tabs>
<Tab title="Node">
@@ -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).
</Tab>
<Tab title="Python">
@@ -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).
</Tab>
<Tab title="Other">
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).
</Tab>
</Tabs>
</Tabs>
Resources:
- [Documentation for Node](https://github.com/Infisical/infisical-node)
- [Documentation for Python](https://github.com/Infisical/infisical-python)

View File

@@ -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"

View File

@@ -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)