Skip to content

Commit 979a920

Browse files
authored
docs: use coder modules in offline deployments (#11788)
* docs: use coder modules in offline deployments * fix typos * Update offline installation instructions with Artifactory support for Coder modules * Review suggestions
1 parent 6b0e129 commit 979a920

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

docs/install/offline.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,58 @@ server, as demonstrated in the example below:
230230
With these steps, you'll have the Coder documentation hosted on your server and
231231
accessible for your team to use.
232232

233+
## Coder Modules
234+
235+
### Artifactory
236+
237+
Air gapped users can clone the [coder/modules](htpps://github.com/coder/modules)
238+
repo and publish a
239+
[local terraform module repository](https://jfrog.com/help/r/jfrog-artifactory-documentation/set-up-a-terraform-module/provider-registry)
240+
to resolve modules via [Artifactory](https://jfrog.com/artifactory/).
241+
242+
1. Create a local-terraform-repository with name `coder-modules-local`
243+
2. Create a virtual repository with name `tf`
244+
3. Follow the below instructions to publish coder modules to Artifactory
245+
246+
```shell
247+
git clone https://github.com/coder/modules
248+
cd modules
249+
jf tfc
250+
jf tf p --namespace="coder" --provider="coder" --tag="1.0.0"
251+
```
252+
253+
4. Generate a token with access to the `tf` repo and set an `ENV` variable
254+
`TF_TOKEN_example.jfrog.io="XXXXXXXXXXXXXXX"` on the Coder provisioner.
255+
5. Create a file `.terraformrc` with following content and mount at
256+
`/home/coder/.terraformrc` within the Coder provisioner.
257+
258+
```hcl
259+
provider_installation {
260+
direct {
261+
exclude = ["registry.terraform.io/*/*"]
262+
}
263+
network_mirror {
264+
url = "https://example.jfrog.io/artifactory/api/terraform/tf/providers/"
265+
}
266+
}
267+
```
268+
269+
6. Update module source as,
270+
271+
```hcl
272+
module "module-name" {
273+
source = "https://example.jfrog.io/tf__coder/module-name/coder"
274+
version = "1.0.0"
275+
agent_id = coder_agent.example.id
276+
...
277+
}
278+
```
279+
280+
> Do not forget to replace example.jgrog.io with uour Artifactory URL
281+
282+
Based on the instructions
283+
[here](https://jfrog.com/blog/tour-terraform-registries-in-artifactory/).
284+
233285
## Firewall exceptions
234286

235287
In restricted internet networks, Coder may require connection to internet.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy