【愚公系列】2023年01月 Dapr分布式应用运行时-Dapr的安装
文章目录
前言
Dapr 是一个可移植的事件驱动运行时,使任何开发人员都可以轻松构建可复原的、 在云和边缘上运行的无状态和有状态应用程序,并包含 语言和开发人员框架。利用挎斗架构的优势,Dapr 帮助 您可以应对构建微服务带来的挑战,并使代码平台不可知。
一、Dapr的安装
1.window安装
1、安装Dapr wind11可以直接使用如下命令安装
winget install Dapr.CLI
winget install Dapr.CLI.Preview
其他window系统MSI安装程序安装
Dapr CLI 的每个版本还包括一个 Windows 安装程序。您可以手动下载 MSI:
- 从最新的 Dapr 版本下载 MSI 程序包。dapr.msi
- 导航到下载的 MSI 文件,然后双击该文件以运行它。
- 按照安装提示接受许可证和安装目录。所选文件夹将添加到用户 PATH 环境变量中。默认值设置为 。$Env:SystemDrive\dapr
- 单击以开始安装。安装完成后,您将看到最后一条消息。Install
2、校验Dapr安装成功
dapr
2.liunx安装
2.1 官方脚本安装
wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bash
通过重新启动终端/命令提示符并运行以下命令来验证 CLI 是否已安装:
dapr
__
____/ /___ _____ _____
/ __ / __ '/ __ \/ ___/
/ /_/ / /_/ / /_/ / /
\__,_/\__,_/ .___/_/
/_/
===============================
Distributed Application Runtime
Usage:
dapr [command]
Available Commands:
completion Generates shell completion scripts
components List all Dapr components. Supported platforms: Kubernetes
configurations List all Dapr configurations. Supported platforms: Kubernetes
dashboard Start Dapr dashboard. Supported platforms: Kubernetes and self-hosted
help Help about any command
init Install Dapr on supported hosting platforms. Supported platforms: Kubernetes and self-hosted
invoke Invoke a method on a given Dapr application. Supported platforms: Self-hosted
list List all Dapr instances. Supported platforms: Kubernetes and self-hosted
logs Get Dapr sidecar logs for an application. Supported platforms: Kubernetes
mtls Check if mTLS is enabled. Supported platforms: Kubernetes
publish Publish a pub-sub event. Supported platforms: Self-hosted
run Run Dapr and (optionally) your application side by side. Supported platforms: Self-hosted
status Show the health status of Dapr services. Supported platforms: Kubernetes
stop Stop Dapr instances and their associated apps. . Supported platforms: Self-hosted
uninstall Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted
upgrade Upgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes
Flags:
-h, --help help for dapr
-v, --version version for dapr
Use "dapr [command] --help" for more information about a command.
2.2 二进制文件安装
下载二进制文件网址:https://github.com/dapr/cli/releases
下载完执行如下命令就ok
tar zxvf dapr_linux_amd64.tar.gz
mv dapr /usr/local/bin
3.初始化Dapr
dapr初始化可以在线,也可以离线 以管理员方式启动powershell dapr uninstall 卸载 先卸载一下,以防有残留
1、在线初始化
powershell执行dapr init
执行成功后可以看到 在 C:\用户\用户名.dapr\ (注:用户名为自己电脑的名字)
2.离线初始化 离线初始话需要下载两个压缩文件 dashboard文件 daprd文件 ①. 先在powershell执行dapr init因为网络问题失败也没关系,这里只是让他生成 components和config.yaml文件 ②. dapr uninstall 卸载 ③. 在 C:\用户\用户名.dapr\ 这个目录下新建 bin目录把两个文件解压后放到bin目录 ④. 这时候在powershell上执行 dapr -v 就会发现 CLI和Runtime 都有版本号了 ⑤. 在环境变量里面添加 C:\用户\用户名.dapr\ 目录配置
到这里就已经全部安装完成了。有的小伙伴可能在Github下载文件很慢。这里推荐用http://toolwa.com/github/ 这个把要下载的链接丢进去进行加速。
相关文章
- Jgit的使用笔记
- 利用Github Action实现Tornadofx/JavaFx打包
- 叹息!GitHub Trending 即将成为历史!
- 微软软了?开源社区讨论炸锅,GitHub CEO 亲自来答
- GitHub Trending 列表频现重复项,前后端都没去重?
- Photoshop Elements 2021版本软件安装教程(mac+windows全版本都有)
- (ps全版本)Photoshop 2020的安装与破解教程(mac+windows全版本都有)
- (ps全版本)Photoshop cc2018的安装与破解教程(mac+windows全版本,包括2023
- 环境搭建:Oracle GoldenGate 大数据迁移到 Redshift/Flat file/Flume/Kafka测试流程
- 每个开发人员都要掌握的:最小 Linux 基础课
- 来撸羊毛了!Windows 环境下 Hexo 博客搭建,并部署到 GitHub Pages
- 超实用!手把手入门 MongoDB:这些坑点请一定远离
- 【GitHub日报】22-10-09 zustand、neovim、webtorrent、express 等4款App今日上新
- 【GitHub日报】22-10-10 brew、minio、vite、seaweedfs、dbeaver 等8款App今日上新
- 【GitHub日报】22-10-11 cobra、grafana、vue、ToolJet、redwood 等13款App今日上新
- Photoshop 2018 下载及安装教程(mac+windows全版本都有,包括最新的2023)
- Photoshop 2017 下载及安装教程(mac+windows全版本都有,包括最新的2023)
- Photoshop 2020 下载及安装教程(mac+windows全版本都有,包括最新的2023)
- Photoshop 2023 资源免费下载(mac+windows全版本都有,包括最新的2023)
- 最新版本Photoshop CC2018软件安装教程(mac+windows全版本都有,包括2023