首页 > 其他分享 >【基础篇】dapr入门开发环境搭建

【基础篇】dapr入门开发环境搭建

时间:2023-03-11 22:22:20浏览次数:47  
标签:入门 Windows version dapr https Docker 安装 搭建

目录

 

1.安装 Hyper-V

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

2.安装WSL2

2.1以管理员启动运行 Windows PowerShell 

PS C:\Users\Administrator> wsl --update -- 更新wsl
正在安装: 适用于 Linux 的 Windows 子系统
已安装 适用于 Linux 的 Windows 子系统。
PS C:\Users\Administrator> wsl -v -l
WSL 版本: 1.1.3.0
内核版本: 5.15.90.1
WSLg 版本: 1.0.49
MSRDC 版本: 1.2.3770
Direct3D 版本: 1.608.2-61064218
DXCore 版本: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows版本: 10.0.19045.2604
PS C:\Users\Administrator> wsl --set-default-version 2

2.2安装Ubuntu18.04

Microsoft Store 官方下载地址: https://apps.microsoft.com/store/detail/ubuntu-22042-lts/9PN20MSR04DW

注意:安装成功需要打开Ubuntu 22.04 设置新的用户和密码!

如遇到参考的对象类型不支持尝试的操作。

Error code: Wsl/Service/0x8007273d
 管理员身份启动cmd/powershell运行

 

 netsh winsock reset

就可以。

Installing, this may take a few minutes...
参考的对象类型不支持尝试的操作。
Error code: Wsl/Service/0x8007273d
参考的对象类型不支持尝试的操作。
Error code: Wsl/Service/0x8007273d
参考的对象类型不支持尝试的操作。
Error code: Wsl/Service/0x8007273d
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: duia
参考的对象类型不支持尝试的操作。
Error code: Wsl/Service/0x8007273d
Enter new UNIX username: duia
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

This message is shown once a day. To disable it please create the
/home/duia/.hushlogin file.
duia@DESKTOP-1VQ67DE:~$

 

3.安装Docker(Win10 系统)

Docker Desktop 是 Docker 在 Windows 10 和 macOS 操作系统上的官方安装方式,这个方法依然属于先在虚拟机中安装 Linux 然后再安装 Docker 的方法。

Docker Desktop 官方下载地址: https://docs.docker.com/desktop/install/windows-install/

注意:此方法仅适用于 Windows 10 操作系统专业版、企业版、教育版和部分家庭版!

注意:启动Docker可能会遇到WSL相关的问题

4.安装Dapr脚手架

Dapr官方文档地址: https://docs.dapr.io/zh-hans/getting-started/

脚本安装 :通过命令行输入以下脚本,默认会安装到 c:\dapr 目录,此种方式比较考验网络,安装不成功可以多尝试几次,实在无法成功请百度手动安装方式

powershell -Command "iwr -useb https://raw.githubusercontent.com/dapr/cli/master/install/install.ps1 | iex"

 

 

C:\Windows\system32>dapr init
Making the jump to hyperspace...
Container images will be pulled from Docker Hub
Installing runtime version 1.10.2
Downloading binaries and setting up components...
dapr_placement container exists or is running. please run `dapr uninstall` first before running `dapr init`

C:\Windows\system32>dapr -v
CLI version: 1.10.0
Runtime version: n/a

C:\Windows\system32>dapr uninstall
Removing Dapr from your machine...
Removing directory: C:\Users\Administrator\.dapr\bin
Removing container: dapr_placement
Dapr has been removed successfully

C:\Windows\system32>dapr init
Making the jump to hyperspace...
Container images will be pulled from Docker Hub
Installing runtime version 1.10.2
Downloading binaries and setting up components...
error downloading daprd binary: Get "https://github.com/dapr/dapr/releases/download/v1.10.2/daprd_windows_amd64.zip": dial tcp 20.205.243.166:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

C:\Windows\system32>dapr init
Making the jump to hyperspace...
Container images will be pulled from Docker Hub
Installing runtime version 1.10.2
Downloading binaries and setting up components...
dapr_placement container exists or is running. please run `dapr uninstall` first before running `dapr init`

C:\Windows\system32>dapr -v
CLI version: 1.10.0
Runtime version: n/a 

 

z遇到这种情况乱就很难受 初始化dapr运行时始终不成功 这种情况就需要手动去github下载dapr运行时了

 

4.安装成功

1.打开Docker会多出这几个基础服务应用

2.安装程序文件路径

//dapr
C:\dapr
//本机daprd、dashboard和pubsub配置文件路径
C:\Users\Administrator\.dapr

 

 

标签:入门,Windows,version,dapr,https,Docker,安装,搭建
From: https://www.cnblogs.com/duia/p/17101424.html

相关文章

  • dfs入门,一个简单的迷宫问题
    AcWing走迷宫问题给定一个 n×m 的二维整数数组,用来表示一个迷宫,数组中只包含 0或 1,其中 0 表示可以走的路,1 表示不可通过的墙壁。最初,有一个人位于左上角 (1,1......
  • flink入门-流处理
    入门需要掌握:从入门demo理解、flink系统架构(看几个关键组件)、安装、使用flink的命令跑jar包+flink的webUI界面的监控、常见错误、调优一、入门demo:统计单词个数0、......
  • Docker安装Nginx入门示例
    测试环境:Ubuntu20.04Dockerversion23.0.1Nginx容器版本:1.23.31.拉取镜像拉取命令:dockerpullnginx:1.23.3查看镜像:yyj@yyj:~$dockerimagesREPOSITORYTA......
  • Jmeter(五十五) - 从入门到精通高级篇 - 如何在linux系统下运行jmeter脚本 - 下篇(详解
    ------------------------------------------------------------------- 转载自:北京-宏哥 -------------------------------------------------------------------- 1.......
  • Day06-Tomcat服务器&Servlet入门
    今日目标1.web知识概述2.tomcat【重点】3.创建servlet xml anno(注解) 4.servlet执行原理5.servlet生命周期6.servlet体系结构1.web相关知识概述【了解】1......
  • kafka服务端搭建 无zookeeper
    前言kafka2.8以后得版本可以不依赖zookeeper搭建kafka集群,本文选用kafka3.3.1版本搭建kafka服务端,搭建环境:CentOS7、JDK17无JDK环境参考搭建:​​https://blog.51cto.com/u_......
  • 赤峰互联网医院搭建|智慧医疗平台|在线问诊APP开发
    内蒙古|包头|赤峰互联网医院搭建|智慧医疗平台|在线问诊APP开发|乌海市|通辽市|呼和浩特市|乌海|鄂尔多斯市|呼伦贝尔市|兴安盟|巴彦淖尔盟|乌兰察布盟|锡林郭勒盟|阿拉善盟......
  • 搭建良好编写体验的webgl编程环境 vscode+vit
    因为webgl代码是以字符串的形式嵌入在javascript代码中,这对于我们编写webgl代码的体验不友好,本文介绍如何搭建友好webgl编程环境:需要安装的vscode插件WebGLGLSLEdito......
  • ubantu搭建RTMP直播推流服务 及OpenSSL 自签名证书
    ubantu搭建RTMP直播推流服务介绍流媒体(streamingmedia)是指将一连串的媒体数据压缩后,经过网上分段发送数据,在网上即时传输影音以供观赏的一种技术与过程,此技术使得数据包......
  • 使用AidLux在安卓手机上搭建一个java服务器
    背景我有一部旧手机,功能完好,后盖碎了,卖不了几个钱,但是12G的内存512G的空间让我舍不得丢,作为一个程序员,平常也会写一点demo玩玩,就想着拿这部旧手机当作一台服务器使用。Ai......