在Mac上运行Rainbond,10分钟快速安装

前言

以往安装部署 Rainbond 的方式都无法绕过 Kubernetes 集群的搭建,无论是作为开发环境还是用于生产交付,部署的过程都非常依赖于服务器或云主机。这在体验 Rainbond 云原生应用管理平台的过程中设置了较高的门槛。然而对于个人开发者而言,准备一台服务器甚至多台服务器,才可以体验到这种企业级产品,是非常奢侈的。从今天开始,Rainbond 开辟了一条可以快速体验的道路,借助常见的个人 PC 平台(诸如 MacOS、Windows 等操作系统)上的 Docker Desktop ,以启动一个容器作为代价,提供一个全功能的 Rainbond 体验环境。这个部署过程被压缩到了 一条命令 运行,10分钟就可以体验到最新版本的 Rainbond。 接下来,将为大家介绍如何在个人 MAC 笔记本上安装使用Rainbond。

MAC目前共分为两种芯片,一种是intel芯片,另外一种就是苹果最新的M1芯片(ARM版本),Rainbond目前不仅仅支持intel芯片,对于新款的M1也提供了支持,这次适配在任何一台MAC上都可以轻松启动Rainbond,这一体验尤其适合个人开发者。通过这种途径安装 Rainbond ,会在短时间内得到一整套开箱即用的单机环境,免去繁琐安装集群的痛苦,对接集群的痛苦,让你在任何笔记本上,台式机上都可以随时随地,实现高效开发测试。

安装Docker Desktop

安装 Rainbond 之前,我们需要在个人 PC 上安装Docker Desktop ,它可以帮助我们在MAC上运行容器。Rainbond 的控制台会以容器的方式运行起来,而在控制台容器中,会以 Docker In Docker 的形式,运行起所有支撑 Rainbond 高级功能的组件。同时在控制台容器中内置 K3s 来提供容器的调度编排能力。

安装的 Docker Desktop 对于版本,和资源限额有一定要求:

Docker Desktop版本 MAC 内存 MAC CPU
4.2及以下 8G预留 2预留

安装Rainbond

启动之前需要定义 Rainbond 网关工作的 IP 地址,确保外界可以访问内部应用组件。IP地址在MAC上可以通过在终端执行ifconfig 命令获得,或者按住Option 键的同时点击右上角 WIFI 图标即可。但注意的一点就是,除非你确定这个集群中部署的业务不会对除本机之外的其他人提供服务,否则不要填写127.0.0.1。

打开 MAC 终端,后续的指令都会在命令行界面下执行

设置IP变量

  1. export EIP=IP地址

Intel版本启动命令(与M1二选一执行):

  1. docker run --privileged -d -p 7070:7070 -p 80:80 -p 443:443 -p 6060:6060 -p 8443:8443 \
  2. --name=rainbond-allinone --restart=unless-stopped \
  3. -v ~/.ssh:/root/.ssh \
  4. -v ~/opt/rainbond:/opt/rainbond \
  5. -e ENABLE_CLUSTER=true \
  6. -e EIP=$EIP \
  7. registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond:v5.5.0-dind-allinone \
  8. && docker logs -f rainbond-allinone

M1版本启动命令(与Intel二选一执行):

  1. docker run --privileged -d -p 7070:7070 -p 80:80 -p 443:443 -p 6060:6060 -p 8443:8443 \
  2. --name=rainbond-allinone --restart=unless-stopped \
  3. -v ~/.ssh:/root/.ssh \
  4. -v ~/opt/rainbond:/opt/rainbond \
  5. -e ENABLE_CLUSTER=true \
  6. -e EIP=$EIP \
  7. registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond:v5.5.0-dind-arm64-allinone \
  8. && docker logs -f rainbond-allinone

启动成功后的会看到以下提示:

  1. 正在加载数据,预计3分钟,时间取决于磁盘性能...
  2. 正在启动Rainbond,预计5分钟...
  3. Rainbond启动成功,可以通过访问: http://$EIP:7070 进入Rainbond控制台

切换进容器,查看集群状态

  1. docker exec -ti rainbond-allinone bash
  2. root@e600f21466b6:~# kubectl get po -n rbd-system

获得以下返回,说明 Rainbond 已经安装完成

  1. NAME READY STATUS RESTARTS AGE
  2. rbd-etcd-0 1/1 Running 2 (4d4h ago) 6d2h
  3. rbd-gateway-4l2l7 1/1 Running 2 (4d4h ago) 6d2h
  4. dashboard-metrics-scraper-7db45b8bb4-5lsfv 1/1 Running 2 (4d4h ago) 6d2h
  5. rbd-webcli-6d64c66cb7-4g8bh 1/1 Running 2 (4d4h ago) 6d2h
  6. kubernetes-dashboard-fbd4fb949-d6wbx 1/1 Running 2 (4d4h ago) 6d2h
  7. rbd-mq-c95cf9857-x4m5b 1/1 Running 2 (4d4h ago) 6d2h
  8. rainbond-operator-7d8649cd8b-cbllk 1/1 Running 3 (4d4h ago) 6d2h
  9. rbd-db-0 2/2 Running 4 (4d4h ago) 6d2h
  10. rbd-hub-64777d89d8-sjhgt 1/1 Running 2 (4d4h ago) 6d2h
  11. rbd-node-8nfmj 1/1 Running 2 (4d4h ago) 6d2h
  12. rbd-monitor-0 1/1 Running 2 (4d4h ago) 6d2h
  13. rbd-eventlog-0 1/1 Running 2 (4d4h ago) 6d2h
  14. rbd-worker-85d4f9696c-lkjn6 1/1 Running 2 (4d4h ago) 6d2h
  15. rbd-resource-proxy-67879f484-tlq26 1/1 Running 4 (4d4h ago) 6d2h
  16. rbd-chaos-2m7nt 1/1 Running 2 (4d4h ago) 6d2h
  17. rbd-api-dff6bc49d-ttxrg 1/1 Running 2 (4d4h ago) 6d2h

快速熟悉Rainbond

为了让大家能够快速熟悉Rainbond,安装成功后,默认会有示例应用:

点击 团队界面 -> admin团队 -> 默认应用,即可查看Ghost示例,示例初次启动大概2分钟左右,待变成绿色,即可访问,如下图:

写在最后

本文简要介绍了一种在 MAC 电脑环境中快速体验 Rainbond 的方式,这种方式对个人开发者,或者缺乏足够服务器硬件支持的小企业、小团队非常友好。Rainbond 目前已经全面适配了 Arm64 架构的芯片,对于最终用户环境为 Arm64 架构的开发者而言,可以借助 Rainbond 有针对性的搭建开发环境。

接下来还有文章介绍如何在 Windows 环境中快速体验 Rainbond 的方式,敬请期待。

K8S中文社区微信公众号

评论 4

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #4

    Joe Engressia Thank you for Helping me in changing my grade and credit score in good shape, Now am a graduate finally, reach out to him of you need his service related to hacking service, His a very good one. reach him here
    DIGITALDAWGPOUNDHACKERGROUP@GMAIL.COM
    whatsapp no. : +1 732 639 1527.

    Ivan Jefferey4个月前 (10-17)回复
  2. #3

    My husband has been frequently deleting all messages for the last couple of days from his phone and he didn’t know i was peeping at him, then i asked him why he was deleting all messages from his phone but he claimed that his phone memory was full and needed more space. Immediately I went in search of a hacker who can get me deleted information and contents from my husband’s phone and luckily for me i came across this reputable ethical hacker Me Fred, this hacker got the job done for me and provided me with results and i saw that my husband has been lying to me. He was simply deleting all pictures, call logs, chats and text messages between him and his secret lover so i wont get to see what he has been doing at my back. Thank God for reputable hackers who are ready to help. I must say am really impressed with the services i got from The hacker Detective and am here to say a very big thank you: contact him on fredvalcyberghost@gmail.com and you can text, call him on +;;1- (;;4;;23)641 1452 and whatsapp him on +15177981808

    Stephanie Duran3个月前 (10-28)回复
  3. #2

    Contact him for any type of hacking, he is a professional hacker that specializes in exposing cheating spouses, and every other hacking related issues. he is a cyber guru, he helps catch cheating spouses by hacking their communications like call, Facebook, text, emails, Skype, whats-app and many more. I have used this service before and he did a very good job, he gave me every proof I needed to know that my fiancee was cheating. You can contact him on his email to help you catch your cheating spouse, or for any other hacking related problems, like hacking websites, bank statement, grades and many more. he will definitely help you, he has helped a lot of people, contact him on, Henryclarkethicalhacker@gmail.com, and you can Text/Call &WhatsApp: +1 (262)-236-7526, and figure out your relationship status. I wish you the best.

    Lucy Janet3个月前 (11-13)回复
  4. #1

    Tracking cellphones and getting an accurate report has been a bit worrisome, thanks to Jeffrey whose service helped me locate certain cellphones without breaking a sweat. His service made me know that the internet has become the most common method of cheating nowadays, either emotionally or physically. Taking a few extra steps in getting what would serve as proof for leaving a toxic relationship, to see who your spouse texts or chats with on social media isn’t a bad idea, I’d recommend you reach out to Jeffreyethicalhacker@gmail.com
    Text,call or whatsapp on: +1 (747)345-9036
    UYHJ

    dda liey5542个月前 (11-23)回复