Enrichment (#1220)

* Debug TID

* Use new TID from wrapped install script

* Add as script param
This commit is contained in:
Jamil
2022-12-20 22:20:30 -06:00
committed by GitHub
parent ed6784d598
commit 25e7de4f24
6 changed files with 25 additions and 9 deletions

View File

@@ -34,11 +34,8 @@
Follow our [deploy guide](https://docs.firezone.dev/deploy) to install your self-hosted instance of Firezone.
Or, if you're on a [supported platform](https://docs.firezone.dev/deploy/docker/supported-platforms), try our one-line install script:
```bash
bash <(curl -fsSL https://github.com/firezone/firezone/raw/master/scripts/install.sh)
```
Or, if you're on a [supported platform](https://docs.firezone.dev/deploy/docker/supported-platforms),
try our [auto-install script](https://docs.firezone.dev/deploy/docker/#option-1-automatic-install).
Using Firezone in production at your organization? Take a look at our [Enterprise Plan](https://www.firezone.dev/pricing).

View File

@@ -49,9 +49,7 @@ After prerequisites are satisfied, you're ready to install the Firezone Server.
The easiest way to deploy Firezone with Docker is the automatic install script:
```bash
bash <(curl -fsSL https://github.com/firezone/firezone/raw/master/scripts/install.sh)
```
<InstallBlock />
This will ask you a few questions regarding initial configuration, then proceed
to download a sample docker-compose.yml file, configure it with your responses,

View File

@@ -0,0 +1,15 @@
import React from "react";
import CodeBlock from '@theme/CodeBlock';
export default function InstallBlock() {
let distinct_id = window.posthog.get_distinct_id()
return (
<div>
<CodeBlock
language="bash">
{`bash <(curl -fsSL https://github.com/firezone/firezone/raw/master/scripts/install.sh) ${distinct_id}`}
</CodeBlock>
</div>
);
}

View File

@@ -1,5 +1,6 @@
// Import the original mapper
import MDXComponents from "@theme-original/MDXComponents";
import InstallBlock from "@site/src/components/InstallBlock";
import AccentBlock from "@site/src/components/AccentBlock";
import Feedback from "@site/src/components/Feedback";
import SignUp from "@site/src/components/SignUp";
@@ -11,6 +12,7 @@ export default {
...MDXComponents,
// Map the "highlight" tag to our <Highlight /> component!
// `Highlight` will receive all props that were passed to `highlight` in MDX
InstallBlock: InstallBlock,
accentblock: AccentBlock,
feedback: Feedback,
newsletter: SignUp,

View File

@@ -35,7 +35,10 @@ add_routes()
setup_telemetry() {
[ -f /var/firezone/.tid ] || cat /proc/sys/kernel/random/uuid > /var/firezone/.tid
export TELEMETRY_ID=$(cat /var/firezone/.tid)
telem_id=$(cat /var/firezone/.tid)
# Try to use $TID from install script, otherwise fallback to old .tid
export TELEMETRY_ID=${TID:-$telem_id}
}
gen_cert() {

View File

@@ -147,6 +147,7 @@ firezoneSetup() {
sed -i.bak "s/DATABASE_PASSWORD=.*/DATABASE_PASSWORD=$db_pass/" "$installDir/.env"
echo "TLS_OPTS=\"$3\"" >> "$installDir/.env"
echo "TELEMETRY_ENABLED=$telemEnabled" >> "$installDir/.env"
echo "TID=${1:-$telemetry_id}" >> "$installDir/.env"
# XXX: This causes perms issues on macOS with postgres
# echo "UID=$(id -u)" >> $installDir/.env