Skip to content

Commit

Permalink
Add dev command
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjackson committed Jul 7, 2023
1 parent 98e41c0 commit ac3fa8f
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 2 deletions.
73 changes: 73 additions & 0 deletions src/pages/docs/cli/dev.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Dev

<Intro>
Watches current configuration and auotmatically runs `jumppad up`
</Intro>

## Usage

```shell
jumppad dev ./config_folder
```

## Flags

<Properties>
<Property name="interval" type="duration" value="5s">
Interval to check for changes. E.g. --interval=5s (default "5s")
</Property>
<Property name="var" type="string" required="false" value="">
Allows setting variables from the command line, variables are specified as a key and value, e.g --var key=value. Can be specified multiple times
</Property>
<Property name="vars-file" type="string" required="false" value="">
Load variables from a location other than *.vars files in the blueprint folder. E.g --vars-file=./file.vars
</Property>
</Properties>

```shell
➜ jp down
2023-07-07T07:07:02.791+0100 [INFO] Destroying resources
2023-07-07T07:07:02.791+0100 [DEBUG] State file does not exist
2023-07-07T07:07:02.791+0100 [ERROR] Unable to destroy stack: error="remove /home/nicj/.jumppad/state/state.json: no such file or directory"

jumppad on  f-library-resource [$] via 🐹 v1.19.2 on 🐳 v20.10.23 using ☁️ default/kubecon-sysdig
export LOG_LEVEL=info

jumppad on  f-library-resource [$] via 🐹 v1.19.2 on 🐳 v20.10.23 using ☁️ default/kubecon-sysdig
➜ jp dev ./examples/container
Checking for changes...
2023-07-07T07:07:19.001+0100 [INFO] Parsing configuration: path=/home/nicj/go/src/github.com/jumppad-labs/jumppad/examples/container
Changes detected, resources to add 10, resources changed 0, resources to delete 0, running up
2023-07-07T07:07:19.007+0100 [INFO] Creating resources from configuration: path=/home/nicj/go/src/github.com/jumppad-labs/jumppad/examples/container
2023-07-07T07:07:19.007+0100 [INFO] Parsing configuration: path=/home/nicj/go/src/github.com/jumppad-labs/jumppad/examples/container
2023-07-07T07:07:19.012+0100 [INFO] Creating ImageCache: ref=default
2023-07-07T07:07:22.905+0100 [INFO] Creating Network: ref=resource.network.onprem
2023-07-07T07:07:23.019+0100 [INFO] Creating ImageCache: ref=default
2023-07-07T07:07:23.712+0100 [INFO] Generating template: ref=resource.template.consul_config output=/home/nicj/.jumppad/data/config/consul.hcl
2023-07-07T07:07:23.713+0100 [INFO] Creating Blueprint: ref=container
2023-07-07T07:07:23.713+0100 [INFO] Creating Container: ref=resource.container.consul
2023-07-07T07:07:26.671+0100 [INFO] Creating Container: ref=resource.sidecar.envoy
2023-07-07T07:07:26.971+0100 [INFO] Creating Output: ref=consul_http_addr

Checking for changes...
2023-07-07T07:07:31.977+0100 [INFO] Parsing configuration: path=/home/nicj/go/src/github.com/jumppad-labs/jumppad/examples/container

Checking for changes...
2023-07-07T07:07:36.985+0100 [INFO] Parsing configuration: path=/home/nicj/go/src/github.com/jumppad-labs/jumppad/examples/container

Checking for changes...
2023-07-07T07:07:41.994+0100 [INFO] Parsing configuration: path=/home/nicj/go/src/github.com/jumppad-labs/jumppad/examples/container

Checking for changes...
2023-07-07T07:07:47.005+0100 [INFO] Parsing configuration: path=/home/nicj/go/src/github.com/jumppad-labs/jumppad/examples/container
Changes detected, resources to add 1, resources changed 0, resources to delete 0, running up
2023-07-07T07:07:47.013+0100 [INFO] Creating resources from configuration: path=/home/nicj/go/src/github.com/jumppad-labs/jumppad/examples/container
2023-07-07T07:07:47.014+0100 [INFO] Parsing configuration: path=/home/nicj/go/src/github.com/jumppad-labs/jumppad/examples/container
2023-07-07T07:07:47.026+0100 [INFO] Refresh Network: ref=onprem
2023-07-07T07:07:47.026+0100 [INFO] Creating ImageCache: ref=default
2023-07-07T07:07:47.039+0100 [INFO] Refresh Template: ref=resource.template.consul_config
2023-07-07T07:07:47.039+0100 [INFO] Generating template: ref=resource.template.consul_config output=/home/nicj/.jumppad/data/config/consul.hcl
2023-07-07T07:07:47.041+0100 [INFO] Refresh Container: ref=consul
2023-07-07T07:07:47.042+0100 [INFO] Refresh Container: ref=envoy
2023-07-07T07:07:47.044+0100 [INFO] Creating Container: ref=resource.sidecar.envoy2
```
47 changes: 45 additions & 2 deletions src/pages/docs/resources/nomad_cluster.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,55 @@ and client nodes.

<Property name="server_config" type="string" required="false" value="">
Path to a file containing custom Nomad server config to use when creating
the server.
the server. Note: Only added to server nodes

This file extends the default server configuration and is mounted
at the path `/etc/nomad.d/server_user_config.hcl` on server nodes.

```hcl
server {
enabled = true
bootstrap_expect = 1
}
client {
enabled = true
meta {
node_type = "server"
}
%s
}
plugin "raw_exec" {
config {
enabled = true
}
}
```
</Property>

<Property name="client_config" type="string" required="false" value="">
Path to a file containing custom Nomad client config to use when creating
the server.
the server. Note: This file is added to both server and clients nodes.

This file extends the default client config and is mounted at the path
/etc/nomad.d/client_user_config.hcl

```hcl
client {
enabled = true
server_join {
retry_join = ["%s"]
}
}
plugin "raw_exec" {
config {
enabled = true
}
}
```
</Property>

<Property name="consul_config" type="string" required="false" value="">
Expand Down

0 comments on commit ac3fa8f

Please sign in to comment.