Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLCC] Develop a demo project #576

Open
5 tasks
seeflood opened this issue May 18, 2022 · 7 comments
Open
5 tasks

[GLCC] Develop a demo project #576

seeflood opened this issue May 18, 2022 · 7 comments
Assignees

Comments

@seeflood
Copy link
Member

seeflood commented May 18, 2022

This is a substask of #471 .
This issue will participate in the chinese GLCC activity . So I wrote it in chinese:

1、题目描述

开发 layotto 演示工程

2、编码任务

开发演示工程,演示 Layotto 帮助应用屏蔽基础设施、帮助应用跨云部署的功能。
演示工程不用从零写,可以 fork istio 的Bookinfo 工程,给 Bookinfo 加一些功能,加入:

  • 展示图书封面(通过 Layotto 调用 File API 组件,获取图片)
  • 展示新闻 (通过 Layotto 调用 state API 组件,比如 redis,获取 News feed)

交互设计图(简陋版)如下:
image

3、技能要求和编程语言

  • 需要后端开发技能。用某种你擅长的后端编程语言(go/java/c++/python/nodejs) 开发一个简单的微服务、调layotto。
  • 课题涉及修改前端页面,但因为是在已有页面上做修改,所以对前端技能要求不高,不难

4、预期完成结果

一个 Layotto 演示工程

5、题目详情

演示工程的架构如下:
image

大部分都是 BookInfo 已有功能,红色是我画的、这次需要加的。
需要在 Bookinfo 工程基础上做如下改动

  • 加入一个 preview service. 该应用可以用 java/golang/nodejs/python 编写,开放两个 http 接口,功能分别是:
    • 通过layotto 调用 File API 组件(比如用minIO组件,OSS 组件)、获取图片
    • 通过layotto 调用 State API 组件(比如 Redis组件),获取新闻
  • 修改 bookinfo 工程,调用 preview service 获取数据
  • 修改 bookinfo 工程的前端页面,展示图片和新闻。

导师


zhou.qunli@foxmail.com

价值

演示 Layotto 的功能,后续可以基于该工程做个在线实验室(katacoda 教程),演示跨云部署,详见 #471

@seeflood seeflood added the GLCC label May 18, 2022
@LXPWing
Copy link
Member

LXPWing commented May 21, 2022

挺酷炫的,有点心动想参加

@seeflood
Copy link
Member Author

@LXPWing 欢迎啊 这个做了有很多钱拿 😆

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions.

@LXPWing
Copy link
Member

LXPWing commented Aug 5, 2022

使用https://killercoda.com/mosn-tutorial/course/layotto/layotto-with-istio的时候发现
image
标红的地方少了星星符号,preview server写法如下:

FILE=/ks/wait-background.sh; while ! test -f ${FILE}; do clear; sleep 0.1; done; bash ${FILE}
docker pull layotto/preview_server:latest
docker run -d -p 9080:8080 --name layotto-preview-server layotto/preview_server:latest
git clone https://github.com/layotto/istio.git

echo "export PATH=/root/istio/bin:\$PATH" >> .bashrc
export PATH=/root/istio/bin:$PATH
istioctl install --set profile=demo -y --manifests=/root/istio/manifests --set .values.global.proxy.image="layotto/proxyv2:latest" --set meshConfig.defaultConfig.binaryPath="/usr/local/bin/mosn" 

git clonehttps://github.com/layotto/istio.git的无法直接使用,需要一些转化才能和 https://istio.io/downloadIstio | TARGET_ARCH=x86_64 sh -一样

@LXPWing
Copy link
Member

LXPWing commented Aug 5, 2022

例如 https://istio.io/downloadIstio | TARGET_ARCH=x86_64 sh的bin文件是istioctl
image

@LXPWing
Copy link
Member

LXPWing commented Aug 5, 2022

git clone https://github.com/layotto/istio.git的bin文件如下
image 现在我不知道如何转换

@seeflood
Copy link
Member Author

seeflood commented Aug 6, 2022

讨论结论 & action:

  • 看下没星星的问题 @seeflood
    没星星是因为 review service 有3个版本,实验室默认用v1版本(没星星),在实验室敲个命令、改成用v3版本就能看到星星了
kubectl apply -f /root/istio-1.10.6/samples/bookinfo/networking/virtual-service-reviews-v3.yaml
  • 打个 bookinfo 镜像,看下能不能CI自动打镜像 @LXPWing
  • 在实验室里,把 bookinfo 镜像换成我们的
    方法:
    实验室下2个istio 然后product page的yaml用 layotto 项目下的
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants