docs: added new docs for infisical package installation instructions

This commit is contained in:
=
2024-11-11 19:23:31 +05:30
parent 65d642113d
commit c1570930a9
5 changed files with 182 additions and 14 deletions

View File

@@ -279,6 +279,14 @@
"self-hosting/deployment-options/kubernetes-helm" "self-hosting/deployment-options/kubernetes-helm"
] ]
}, },
{
"group": "Linux Package",
"pages": [
"self-hosting/deployment-options/native/linux-package/installation",
"self-hosting/deployment-options/native/linux-package/migration",
"self-hosting/deployment-options/native/linux-package/commands-configuration"
]
},
"self-hosting/configuration/envars", "self-hosting/configuration/envars",
"self-hosting/configuration/requirements", "self-hosting/configuration/requirements",
{ {

View File

@@ -0,0 +1,38 @@
---
title: "Commands and Configuration"
description: "Learn all the available commands and configuration of the linux package."
---
## Configuration
All Infisical configuration is managed from a central file called `infisical.rb` located in the `/etc/infisical` directory.
<Info> After updating the `infisical.rb` file, remember to run `infisical-ctl reconfigure` to apply the changes. </Info>
### Example Configuration
```ruby
# Important: Replace these values with secure keys in production
infisical_core['ENCRYPTION_KEY'] = '6c1fe4e407b8911c104518103505b218'
infisical_core['AUTH_SECRET'] = '5lrMXKKWCVocS/uerPsl7V+TX/aaUaI7iDkgl3tSmLE='
# Database connection strings
infisical_core['DB_CONNECTION_URI'] = 'postgres://infisical:infisical@localhost:5432/infisical'
infisical_core['REDIS_URL'] = 'redis://localhost:6379'
```
For a complete list of configuration options, visit our [configuration variables documentation](/self-hosting/configuration/envars).
## Available Commands
The `infisical-ctl` command provides several options to manage your Infisical deployment:
| Command | Description |
| --- | --- |
| `infisical-ctl reconfigure` | Restarts the Infisical services and applies any configuration changes |
| `infisical-ctl tail` | Shows the logs of the Infisical application |
| `infisical-ctl status` | Displays the current running status of the Infisical services |
| `infisical-ctl stop` | Stops the Infisical services |
| `infisical-ctl start` | Starts the Infisical services |
For database migration-related commands, refer to the [Migrations Guide](/self-hosting/native/linux-package/migration).

View File

@@ -0,0 +1,102 @@
---
title: "Installation"
description: "Learn how to deploy Infisical using linux package."
---
Infisical can be deployed on Linux virtual machines without containers using our Linux packages. Currently, we support Linux systems running on AMD64 architecture (ARM coming soon).
This standalone deployment uses a "Bring Your Own Database" (BYOD) approach, meaning you'll need to provide your own PostgreSQL and Redis databases for Infisical services. These databases are not included in the package.
## Prerequisites
Before beginning the installation, ensure you have:
- A server running a linux-based operating system (Ubuntu, Debian) or RHEL-based system
- A PostgreSQL database instance
- A Redis database instance
## Installation Steps
<Steps>
<Step title="Install the Infisical Package">
Choose your operating system below to install Infisical:
<Tabs>
<Tab title="Debian/Ubuntu">
First, add the Infisical repository:
```bash
curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-core/setup.deb.sh' \
| sudo -E bash
```
Then install Infisical:
```bash
sudo apt-get update && sudo apt-get install -y infisical-core
```
> **Note**: For production environments, we strongly recommend installing a specific version of the package to maintain consistency across reinstalls. View available versions at [Infisical Package Versions](https://cloudsmith.io/~infisical/repos/infisical-core/packages/).
</Tab>
<Tab title="RedHat/CentOS/Amazon Linux">
First, add the Infisical repository:
```bash
curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-core/setup.rpm.sh' \
| sudo -E bash
```
Then install Infisical:
```bash
sudo yum install infisical-core
```
> **Note**: For production environments, we strongly recommend installing a specific version of the package to maintain consistency across reinstalls. View available versions at [Infisical Package Versions](https://cloudsmith.io/~infisical/repos/infisical-core/packages/).
</Tab>
</Tabs>
To verify the installation, run:
```bash
infisical-ctl help
```
</Step>
<Step title="Create the Configuration File">
Create an `infisical.rb` file in the `/etc/infisical` directory. This file will contain your database connections and other configuration settings.
<Accordion title="Example Configuration">
```ruby
# Important: Replace these values with secure keys in production
infisical_core['ENCRYPTION_KEY'] = '6c1fe4e407b8911c104518103505b218'
infisical_core['AUTH_SECRET'] = '5lrMXKKWCVocS/uerPsl7V+TX/aaUaI7iDkgl3tSmLE='
# Database connection strings
infisical_core['DB_CONNECTION_URI'] = 'postgres://infisical:infisical@localhost:5432/infisical'
infisical_core['REDIS_URL'] = 'redis://localhost:6379'
```
</Accordion>
For a complete list of configuration options, visit our [configuration variables documentation](/self-hosting/configuration/envars).
</Step>
<Step title="Start Infisical">
1. Run the following command to start the Infisical server:
```bash
infisical-ctl reconfigure
```
By default, the server will run on port `8080`. You can modify this in the `infisical.rb` configuration file.
2. Monitor your deployment:
- Check the application status:
```bash
infisical-ctl status
```
- View real-time logs:
```bash
infisical-ctl tail
```
</Step>
</Steps>

View File

@@ -0,0 +1,30 @@
---
title: "Migration"
description: "Learn how to run migration using Infisical linux package."
---
By default, migrations automatically run each time you execute `infisical-ctl reconfigure`. This behavior may not be desirable when deploying with horizontal scaling.
## Disable Auto Migration
To disable automatic migrations, add the following configuration to your `infisical.rb` file:
```ruby
infisical_core['auto_migration'] = false
```
## Migration Commands
`infisical-ctl` provides several commands to manage database migrations. You can run these commands in two ways:
- Provide the PostgreSQL database connection as an environment variable, or
- Let the system load the connection details from the Infisical application after reconfiguration
| Command | Description |
| ---------------------------------- | --------------------------------------------------------------------------- |
| `infisical-ctl migration up` | Runs the next migration that hasn't been applied yet |
| `infisical-ctl migration down` | Reverts the most recent migration, undoing its changes |
| `infisical-ctl migration list` | Lists all available migration files without applying them |
| `infisical-ctl migration status` | Displays the status of each migration, showing which have been applied |
| `infisical-ctl migration latest` | Applies all pending migrations to bring the database up to date |
| `infisical-ctl migration rollback` | Reverts all applied migrations, returning the database to its initial state |

View File

@@ -33,21 +33,11 @@ Choose from a number of deployment options listed below to get started.
Use our Helm chart to Install Infisical on your Kubernetes cluster. Use our Helm chart to Install Infisical on your Kubernetes cluster.
</Card> </Card>
</CardGroup> </CardGroup>
{/* <CardGroup cols={2}> <Card
<Card
title="Native Deployment" title="Native Deployment"
color="#000000" color="#000000"
icon="box" icon="box"
href="deployment-options/native/standalone-binary" href="deployment-options/native/linux-package/installation"
> >
Install Infisical on your Debian-based system without containers using our standalone binary. Install Infisical on your system without containers using our linux package.
</Card> </Card>
<Card
title="Native Deployment, High Availability"
color="#000000"
icon="boxes-stacked"
href="deployment-options/native/high-availability"
>
Install Infisical on your Debian-based instances without containers using our standalone binary with high availability out of the box.
</Card>
</CardGroup> */}