Skip to content

Commit 32f2aaf

Browse files
authored
docs: v1 updates (#181)
1 parent fae3443 commit 32f2aaf

25 files changed

+305
-588
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,6 @@ jobs:
3535
- uses: actions/setup-node@v3
3636
with:
3737
node-version: 16
38-
- uses: actions/checkout@v3
39-
with:
40-
repository: 'pyroscope-io/docs-private'
41-
ref: 'master'
42-
path: 'docs-private'
43-
token: ${{ secrets.DOCS_PRIVATE_ACCESS_TOKEN }}
44-
- name: copy Makefile
45-
run: mv docs-private/Makefile Makefile
46-
- name: copy generate-pdfs.rb
47-
run: mv docs-private/generate-pdfs.rb generate-pdfs.rb
48-
- name: copy extra-plugins.js
49-
run: mv docs-private/extra-plugins.js extra-plugins.js
50-
# For PRs we just build
51-
# for merges we deploy
52-
- name: build
53-
if: ${{ github.event_name == 'pull_request' }}
54-
run: make build
5538
- name: deploy
5639
if: ${{ github.event_name != 'pull_request' }}
5740
run: make deploy

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nodejs 14.17.0
1+
nodejs 16.18.0

Makefile

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# updates slack url
2+
SLACK_INVITE_URL="https://join.slack.com/t/pyroscope/shared_invite/zt-188djmr07-fGVF19hFTPZrLCFJAgwPyw"
3+
4+
API_ADDRESS=https://pyroscope.io
5+
6+
.PHONY: install
7+
install:
8+
yarn install
9+
10+
.PHONY: build-info
11+
build-info:
12+
git show-ref --head --hash=8 2> /dev/null | head -n1 > static/build-info.txt
13+
date >> static/build-info.txt
14+
15+
.PHONY: build
16+
build: install build-info
17+
yarn build
18+
19+
.PHONY: generate-pdfs
20+
generate-pdfs: invalidate-cache
21+
ruby generate-pdfs.rb
22+
23+
.PHONY: create-redirects
24+
create-redirects:
25+
ruby create-redirects.rb
26+
27+
.PHONY: slack-url
28+
slack-url:
29+
aws s3api put-object --bucket pyroscope.io --key slack/index.html --body static/slack/index.html --website-redirect-location ${SLACK_INVITE_URL}
30+
aws cloudfront create-invalidation --distribution-id E35O9P6VNL3Z5X --paths '/*'
31+
32+
.PHONY: upload
33+
upload:
34+
# This bucket is set up with a static website endpoint and no public-read.
35+
# There's a cloudfront distribution in front of it.
36+
# Access is set up to only allow reads with a special refferer header that's
37+
# set on cloudfront side. This way it's only accessible via cloudfront.
38+
aws s3 sync --exclude 'videos/*' --exclude 'storybook/*' build/ s3://pyroscope.io/
39+
aws s3 cp --acl public-read static/img/favicon.ico s3://pyroscope.io/favicon.ico
40+
41+
.PHONY: invalidate-cache
42+
invalidate-cache:
43+
aws cloudfront wait invalidation-completed --distribution-id E35O9P6VNL3Z5X --id $(shell aws cloudfront create-invalidation --distribution-id E35O9P6VNL3Z5X --paths '/*' | jq .Invalidation.Id)
44+
45+
.PHONY: deploy
46+
deploy:
47+
$(MAKE) build
48+
$(MAKE) upload
49+
$(MAKE) create-redirects
50+
$(MAKE) slack-url
51+
$(MAKE) invalidate-cache

create-redirects.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require 'json'
2+
3+
JSON.parse(File.read("redirects.json")).each_pair do |from, to|
4+
from = from.sub(/^\//, "").sub(/\/$/, "")
5+
next if to == ""
6+
7+
puts "Redirect 301 #{from} #{to}"
8+
system(
9+
"aws", "s3api", "put-object",
10+
"--bucket", "pyroscope.io",
11+
"--key", "#{from}/index.html",
12+
"--body", "static/slack/index.html",
13+
"--website-redirect-location", to)
14+
end

docs/agent-install-linux.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Pyroscope team maintain and sign packages for the following Linux distributions:
9494
</Tabs>
9595

9696
:::tip
97-
To find out about other ways of installing Pyroscope, or to find packages for other CPU architectures (e.g ARM) visit our [Downloads](/downloads) page.
97+
To find out about other ways of installing Pyroscope, or to find packages for other CPU architectures (e.g ARM) visit our [Downloads](https://github.com/grafana/pyroscope/releases) page.
9898
:::
9999

100100
**Pyroscope Agent** is not installed as `systemd` service. If you need to profile a process which is running as a service,

docs/agent-install-macos.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ brew install pyroscope-io/brew/pyroscope
2222
```
2323

2424
:::tip
25-
To find out about other ways of installing Pyroscope, or to find packages for other CPU architectures (e.g ARM) visit our [Downloads](/downloads) page.
25+
To find out about other ways of installing Pyroscope, or to find packages for other CPU architectures (e.g ARM) visit our [Downloads](https://github.com/grafana/pyroscope/releases) page.
2626
:::
2727

2828
## Verify the installation

docs/agent-install-windows.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Install MSI package with `msiexec`:
4545
<br/>
4646

4747
:::tip
48-
To find out about other ways of installing Pyroscope, or to find packages for other CPU architectures (e.g ARM) visit our [Downloads](/downloads) page.
48+
To find out about other ways of installing Pyroscope, or to find packages for other CPU architectures (e.g ARM) visit our [Downloads](https://github.com/grafana/pyroscope/releases) page.
4949
:::
5050

5151
## Verify the installation

docs/architecture.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Location for various helper programs / scripts.
6262

6363
### `scripts/packages`
6464

65-
Helper code / files we use to make releases and generate packages for Linux / macOS. See [Downloads](/downloads) page for more information.
65+
Helper code / files we use to make releases and generate packages for Linux / macOS. See [Downloads](https://github.com/grafana/pyroscope/releases) page for more information.
6666

6767
### `third_party/rustdeps`
6868

docs/developer-guide.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Location for various helper programs / scripts.
248248

249249
### /scripts/packages
250250

251-
Helper code / files we use to make releases and generate packages for Linux / macOS. See [Downloads](/downloads) page for more information.
251+
Helper code / files we use to make releases and generate packages for Linux / macOS. See [Downloads](https://github.com/grafana/pyroscope/releases) page for more information.
252252

253253
### /third_party/rustdeps
254254

docs/installing-pyroscope-overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const Video = () => (
2929

3030
### Step 1: Install Pyroscope Server
3131

32-
We provide a few different ways for you to install Pyroscope Server on [Linux](server-install-linux.mdx), [macOS](server-install-macos.mdx) or run it in <FontAwesomeIcon color="#0db7ed" icon={faDocker}/> [Docker](docker-guide.mdx). To find out about other ways of installing Pyroscope, or to find packages for other CPU architectures (e.g ARM) visit our [Downloads](/downloads) page.
32+
We provide a few different ways for you to install Pyroscope Server on [Linux](server-install-linux.mdx), [macOS](server-install-macos.mdx) or run it in <FontAwesomeIcon color="#0db7ed" icon={faDocker}/> [Docker](docker-guide.mdx). To find out about other ways of installing Pyroscope, or to find packages for other CPU architectures (e.g ARM) visit our [Downloads](https://github.com/grafana/pyroscope/releases) page.
3333

3434
After you start the server you should be able to open [http://localhost:4040/](http://localhost:4040/) and see that pyroscope server is profiling itself (`pyroscope.server.cpu` application).
3535

0 commit comments

Comments
 (0)