Skip to content

Commit 3d5d558

Browse files
Update the downloads page to include more alternates (#286)
1 parent 1ecc374 commit 3d5d558

File tree

2 files changed

+78
-42
lines changed

2 files changed

+78
-42
lines changed

src/data/pages/downloads.json

Lines changed: 54 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,69 @@
1111
"sectionHeading": "Alternative Installation Options",
1212
"subheadings": {
1313
"darwin": {
14-
"subSection1Heading": "Install darwin repository",
15-
"subSection1Paragraph1": "osquery can be installed from the Homebrew Cask repository.",
16-
"terminalCommands": [
17-
"brew install --cask osquery"
14+
"sections": [
15+
{
16+
"heading": "Install darwin repository",
17+
"paragraph": "osquery can be installed from the Homebrew Cask repository",
18+
"terminalCommands": [
19+
"brew install --cask osquery"
20+
]
21+
}
1822
]
1923
},
2024
"ubuntu": {
21-
"subSection1Heading": "Install apt repository",
22-
"subSection1Paragraph1": "We publish osquery to an apt repository. The DEBs have extremely few dependencies and should work on *most* x86_64 Linux operating systems.",
23-
"terminalCommands": [
24-
"sudo mkdir -p /etc/apt/keyrings",
25-
"curl -L https://pkg.osquery.io/deb/pubkey.gpg | sudo tee /etc/apt/keyrings/osquery.asc",
26-
"sudo add-apt-repository 'deb [arch=amd64 signed-by=/etc/apt/keyrings/osquery.asc] https://pkg.osquery.io/deb deb main'",
27-
"sudo apt install osquery"
25+
"sections": [
26+
{
27+
"heading": "Install apt repository (22.04 and later)",
28+
"paragraph": "We publish osquery to an apt repository. The DEBs have extremely few dependencies and should work on *most* x86_64 Linux operating systems.",
29+
"terminalCommands": [
30+
"sudo mkdir -p /etc/apt/keyrings",
31+
"curl -L https://pkg.osquery.io/deb/pubkey.gpg | sudo tee /etc/apt/keyrings/osquery.asc",
32+
"sudo add-apt-repository 'deb [arch=amd64 signed-by=/etc/apt/keyrings/osquery.asc] https://pkg.osquery.io/deb deb main'",
33+
"sudo apt install osquery"
34+
]
35+
},
36+
{
37+
"heading": "Install apt repository (Prior to 22.04)",
38+
"paragraph": "This uses apt-key",
39+
"terminalCommands": [
40+
"export OSQUERY_KEY=1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B",
41+
"sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $OSQUERY_KEY",
42+
"sudo add-apt-repository 'deb [arch=amd64] https://pkg.osquery.io/deb deb main'",
43+
"sudo apt-get update",
44+
"sudo apt-get install osquery"
45+
]
46+
}
2847
]
2948
},
3049
"centos": {
31-
"subSection1Heading": "Install yum repository",
32-
"subSection1Paragraph1": "We publish osquery to a yum repository. The RPMs have extremely few dependencies and should work on *most* x86_64 Linux operating systems. You may install the \"auto-repo-add\" RPM or add the repository target.",
33-
"terminalCommands": [
34-
"curl -L https://pkg.osquery.io/rpm/GPG | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-osquery",
35-
"sudo yum-config-manager --add-repo https://pkg.osquery.io/rpm/osquery-s3-rpm.repo",
36-
"sudo yum-config-manager --enable osquery-s3-rpm-repo",
37-
"sudo yum install osquery"
50+
"sections": [
51+
{
52+
"heading": "Install yum repository",
53+
"paragraph": "We publish osquery to a yum repository. The RPMs have extremely few dependencies and should work on *most* x86_64 Linux operating systems. You may install the \"auto-repo-add\" RPM or add the repository target.",
54+
"terminalCommands": [
55+
"curl -L https://pkg.osquery.io/rpm/GPG | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-osquery",
56+
"sudo yum-config-manager --add-repo https://pkg.osquery.io/rpm/osquery-s3-rpm.repo",
57+
"sudo yum-config-manager --enable osquery-s3-rpm-repo",
58+
"sudo yum install osquery"
59+
]
60+
}
3861
]
3962
},
4063
"windows": {
41-
"subSection1Heading": "Install windows repository",
42-
"subSection1Paragraph1": "We recommend installing and deploying Windows support using chocolatey. Please let us know if your enterprise could make use of other package formats.",
43-
"terminalCommands": [
44-
"choco install osquery"
64+
"sections": [
65+
{
66+
"heading": "arm64/aarch64 windows support",
67+
"paragraph": "Though there is not currently an msi install available, you can find the windows arm64 build on the GitHub releases page (https://github.com/osquery/osquery/releases)",
68+
"terminalCommands": []
69+
},
70+
{
71+
"heading": "Additional Install windows repository",
72+
"paragraph": "We recommend installing and deploying Windows support using chocolatey. Please let us know if your enterprise could make use of other package formats.",
73+
"terminalCommands": [
74+
"choco install osquery"
75+
]
76+
}
4577
]
4678
}
4779
}

src/pages/Downloads/Downloads.js

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ const OFFICIAL = 'official'
2222

2323
const baseClass = 'downloads-page'
2424
const installOptionNames = {
25+
windows: 'Windows',
2526
darwin: 'macOS',
2627
ubuntu: 'Debian Linux',
2728
centos: 'RPM Linux',
28-
windows: 'Windows',
2929
}
3030
const installOptionNamesKeys = keys(installOptionNames)
3131
const installOptionNamesValues = values(installOptionNames)
3232

3333
class Downloads extends Component {
3434
state = {
35-
selectedInstallOption: 'darwin',
35+
selectedInstallOption: 'windows',
3636
}
3737

3838
onInstallOptionChange = installOption => {
@@ -155,24 +155,28 @@ class Downloads extends Component {
155155
name={selectedInstallOption}
156156
/>
157157

158-
<div>
159-
<Heading5>{alternativeInstallOptionContent.subSection1Heading}</Heading5>
160-
161-
<Paragraph>{alternativeInstallOptionContent.subSection1Paragraph1}</Paragraph>
162-
</div>
163-
164-
<Terminal.Wrapper className={`${baseClass}__terminal`}>
165-
<Terminal.Body className={`${baseClass}__terminal-body`}>
166-
{alternativeInstallOptionContent.terminalCommands.map((terminalCommand, idx) => {
167-
return (
168-
<Monospace key={`terminal-command-${idx}`}>
169-
<label className="unselectable">$</label> {terminalCommand}
170-
<br />
171-
</Monospace>
172-
)
173-
})}
174-
</Terminal.Body>
175-
</Terminal.Wrapper>
158+
{alternativeInstallOptionContent.sections.map((sec, idx) => {
159+
return (
160+
<div>
161+
<Heading5>{sec.heading}</Heading5>
162+
<Paragraph>{sec.paragraph}</Paragraph>
163+
{sec.terminalCommands.length > 0 && (
164+
<Terminal.Wrapper className={`${baseClass}__terminal`}>
165+
<Terminal.Body className={`${baseClass}__terminal-body`}>
166+
{sec.terminalCommands.map((terminalCommand, idx) => {
167+
return (
168+
<Monospace key={`terminal-command-${idx}`}>
169+
<label className="unselectable">$</label> {terminalCommand}
170+
<br />
171+
</Monospace>
172+
)
173+
})}
174+
</Terminal.Body>
175+
</Terminal.Wrapper>
176+
)}
177+
</div>
178+
)
179+
})}
176180
</section>
177181
</div>
178182
)

0 commit comments

Comments
 (0)