You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 .
138
166
```
139
167
140
168
#### 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
143
171
144
172
```bash
145
173
# Create Docker network
146
-
$ docker network create dapr-network
174
+
docker network create dapr-network
147
175
148
176
# Install Dapr to the network
149
-
$ dapr init --network dapr-network
177
+
dapr init --network dapr-network
150
178
```
151
179
152
180
> 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
190
218
*Note: The default namespace is dapr-system. The installation will appear under the name `dapr` for Helm*
191
219
192
220
```bash
193
-
$ dapr init -k
221
+
dapr init -k
222
+
```
194
223
224
+
Output should look like as follows:
225
+
226
+
```
195
227
⌛ Making the jump to hyperspace...
196
228
ℹ️ Note: To install Dapr using Helm, see here: https://docs.dapr.io/getting-started/install-dapr/#install-with-helm-advanced
197
229
@@ -575,27 +607,26 @@ dapr completion
575
607
In order to enable Unix domain socket to connect Dapr API server, use the `--unix-domain-socket` flag:
576
608
577
609
```
578
-
$ dapr run --app-id nodeapp --unix-domain-socket node app.js
610
+
dapr run --app-id nodeapp --unix-domain-socket node app.js
579
611
```
580
612
581
613
Dapr will automatically create a Unix domain socket to connect Dapr API server.
582
614
583
615
If you want to invoke your app, also use this flag:
print.FailureStatusEvent(os.Stderr, "both --image-registry and --from-dir flags cannot be given at the same time")
111
+
os.Exit(1)
112
+
}
113
+
iflen(strings.TrimSpace(fromDir)) !=0 {
114
+
print.WarningStatusEvent(os.Stdout, "Local bundle installation using --from-dir flag is currently a preview feature and is subject to change. It is only available from CLI version 1.7 onwards.")
108
115
}
109
-
ifimageRegistryURL!="" {
116
+
iflen(strings.TrimSpace(imageRegistryURL))!=0 {
110
117
print.WarningStatusEvent(os.Stdout, "Flag --image-registry is a preview feature and is subject to change. It is only available from CLI version 1.7 onwards.")
InitCmd.Flags().BoolVarP(&enableMTLS, "enable-mtls", "", true, "Enable mTLS in your cluster")
143
150
InitCmd.Flags().BoolVarP(&enableHA, "enable-ha", "", false, "Enable high availability (HA) mode")
144
151
InitCmd.Flags().String("network", "", "The Docker network on which to deploy the Dapr runtime")
145
-
InitCmd.Flags().StringVarP(&fromDir, "from-dir", "", "", "Use Dapr artifacts from local directory instead of from network to init")
152
+
InitCmd.Flags().StringVarP(&fromDir, "from-dir", "", "", "Use Dapr artifacts from local directory for self-hosted installation")
146
153
InitCmd.Flags().BoolP("help", "h", false, "Print this help message")
147
154
InitCmd.Flags().StringArrayVar(&values, "set", []string{}, "set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)")
Copy file name to clipboardExpand all lines: cmd/run.go
+3-3
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ var (
47
47
metricsPortint
48
48
maxRequestBodySizeint
49
49
unixDomainSocketstring
50
-
apiLogLevelstring
50
+
enableAPILoggingbool
51
51
)
52
52
53
53
const (
@@ -116,7 +116,7 @@ dapr run --app-id myapp --app-port 3000 --app-protocol grpc -- go run main.go
116
116
MetricsPort: metricsPort,
117
117
MaxRequestBodySize: maxRequestBodySize,
118
118
UnixDomainSocket: unixDomainSocket,
119
-
APILogLevel: apiLogLevel,
119
+
EnableAPILogging: enableAPILogging,
120
120
})
121
121
iferr!=nil {
122
122
print.FailureStatusEvent(os.Stderr, err.Error())
@@ -365,7 +365,7 @@ func init() {
365
365
RunCmd.Flags().BoolP("help", "h", false, "Print this help message")
366
366
RunCmd.Flags().IntVarP(&maxRequestBodySize, "dapr-http-max-request-size", "", -1, "Max size of request body in MB")
367
367
RunCmd.Flags().StringVarP(&unixDomainSocket, "unix-domain-socket", "u", "", "Path to a unix domain socket dir. If specified, Dapr API servers will use Unix Domain Sockets")
368
-
RunCmd.Flags().StringVarP(&apiLogLevel, "api-log-level", "", "debug", "The api calls log verbosity. Valid values are: debug, info, off")
368
+
RunCmd.Flags().BoolVar(&enableAPILogging, "enable-api-logging", false, "Log API calls at INFO verbosity. Valid values are: true or false")
0 commit comments