Skip to content

Commit 965aacd

Browse files
Adding airgap installation in README (#935)
* Adding airgap installation in README Signed-off-by: shivam <[email protected]> * Removing numbers from commands Signed-off-by: shivam <[email protected]> * Removing dollar from code lines Signed-off-by: shivam <[email protected]> * Updating airgap comment Signed-off-by: shivam <[email protected]> * Updating README Signed-off-by: shivam <[email protected]> * Updating Readme Signed-off-by: shivam <[email protected]> Co-authored-by: Mukundan Sundararajan <[email protected]>
1 parent acc5416 commit 965aacd

File tree

1 file changed

+40
-8
lines changed

1 file changed

+40
-8
lines changed

README.md

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ You can install or upgrade to a specific version of the Dapr runtime using `dapr
120120

121121
```bash
122122
# Install v1.0.0 runtime
123-
$ dapr init --runtime-version 1.0.0
123+
dapr init --runtime-version 1.0.0
124124

125125
# Check the versions of CLI and runtime
126-
$ dapr --version
126+
dapr --version
127127
CLI version: v1.0.0
128128
Runtime version: v1.0.0
129129
```
@@ -134,7 +134,35 @@ You can install Dapr runtime by pulling docker images from a given private regis
134134
135135
```bash
136136
# Example of pulling images from a private registry.
137-
$ dapr init --image-registry example.io/<username>
137+
dapr init --image-registry example.io/<username>
138+
```
139+
140+
#### Install in airgap environment
141+
142+
You can install Dapr runtime in airgap (offline) environment using a pre-downloaded [installer bundle](https://github.com/dapr/installer-bundle/releases). You need to download the archived bundle for your OS beforehand (e.g., daprbundle_linux_amd64.tar.gz,) and unpack it. Thereafter use the local Dapr CLI binary in the bundle with `--from-dir` flag in the init command to point to the extracted bundle location to initialize Dapr.
143+
144+
Move to the bundle directory and run the following command:
145+
146+
```bash
147+
# Initializing dapr in airgap environment
148+
./dapr init --from-dir .
149+
```
150+
151+
> For windows, use `.\dapr.exe` to point to the local Dapr CLI binary.
152+
153+
> If you are not running the above command from the bundle directory, provide the full path to bundle directory as input. For example, assuming the bundle directory path is $HOME/daprbundle, run `$HOME/daprbundle/dapr init --from-dir $HOME/daprbundle` to have the same behavior.
154+
155+
> Note: Dapr Installer bundle just contains the placement container apart from the binaries and so `zipkin` and `redis` are not enabled by default. You can pull the images locally either from network or private registry and run as follows:
156+
157+
```bash
158+
docker run --name "dapr_zipkin" --restart always -d -p 9411:9411 openzipkin/zipkin
159+
docker run --name "dapr_redis" --restart always -d -p 6379:6379 redis
160+
```
161+
162+
Alternatively to the above, you can also have slim installation as well to install dapr without running any Docker containers in airgap mode.
163+
164+
```bash
165+
./dapr init --slim --from-dir .
138166
```
139167

140168
#### Install to a specific Docker network
@@ -143,10 +171,10 @@ You can install the Dapr runtime to a specific Docker network in order to isolat
143171

144172
```bash
145173
# Create Docker network
146-
$ docker network create dapr-network
174+
docker network create dapr-network
147175

148176
# Install Dapr to the network
149-
$ dapr init --network dapr-network
177+
dapr init --network dapr-network
150178
```
151179

152180
> Note: When installed to a specific Docker network, you will need to add the `--placement-host-address` arguments to `dapr run` commands run in any containers within that network.
@@ -190,8 +218,12 @@ The init command will install Dapr to a Kubernetes cluster. For more advanced us
190218
*Note: The default namespace is dapr-system. The installation will appear under the name `dapr` for Helm*
191219

192220
```bash
193-
$ dapr init -k
221+
dapr init -k
222+
```
194223

224+
Output should look like as follows:
225+
226+
```
195227
⌛ Making the jump to hyperspace...
196228
ℹ️ Note: To install Dapr using Helm, see here: https://docs.dapr.io/getting-started/install-dapr/#install-with-helm-advanced
197229
@@ -575,15 +607,15 @@ dapr completion
575607
In order to enable Unix domain socket to connect Dapr API server, use the `--unix-domain-socket` flag:
576608

577609
```
578-
$ dapr run --app-id nodeapp --unix-domain-socket node app.js
610+
dapr run --app-id nodeapp --unix-domain-socket node app.js
579611
```
580612

581613
Dapr will automatically create a Unix domain socket to connect Dapr API server.
582614

583615
If you want to invoke your app, also use this flag:
584616

585617
```
586-
$ dapr invoke --app-id nodeapp --unix-domain-socket --method mymethod
618+
dapr invoke --app-id nodeapp --unix-domain-socket --method mymethod
587619
```
588620

589621
### Set API log level

0 commit comments

Comments
 (0)