手把手教你搭建SUSE Cloud Application Platform (内有安装视频)

Share
Share

本文是手把手教学系列之一:手把手教你搭建SUSE Cloud Application Platform,由SUSE技术专家谢嘉麒提供。

SUSE Cloud Application Platform 是一款现代化应用程序交付平台,用于为 Kubernetes 带来先进的云原生开发体验,这实际上已成为企业容器的编制标准。SUSE Cloud Application Platform 可以消除手动 IT 配置,并通过加快应用程序上市速度来帮助加快创新速度。开发人员可以自主行动并在几分钟(而不是数周)内将应用程序交付到云端,同时确保遵循 IT 指导原则,并且无需依靠稀缺的 IT 资源即可执行每一步的手动配置。简化应用程序交付之后,就能在企业开发、运营和 DevOps 团队的领导下明确地提高业务敏捷性。

下面手把手演示如何搭建SUSE Cloud Application Platform。

 

1. CAP的部署模式

2. AKS架构

3.安装流程

4.准备客户端

zypper info azure-cli

zypper info cf-cli

zypper info jq

zypper info firefox

zypper info kubernetes-client

zypper info helm

5. 登陆azure

az login

6.查看账户权限

az role assignment list –assignee tom@example.com

确保出现

#”roleDefinitionName”: “User Access Administrator”

7. 在浏览器中启动aks实例

8. 下载aks登陆密钥到本地

az aks get-credentials –resource-group $RG_NAME –name $AKS_NAME

9. 连接aks

kubectl get nodes

kubectl get pods –all-namespaces

10.初始化helm

kubectl create serviceaccount –namespace kube-system tiller

kubectl create clusterrolebinding tiller-cluster-rule –clusterrole=cluster-admin –serviceaccount=kube-system:tiller

kubectl patch deploy –namespace kube-system tiller-deploy -p ‘{“spec”:{“template”:{“spec”:{“serviceAccount”:”tiller”}}}}’

helm init

11.在helm中添加suse官方源

helm repo add suse https://kubernetes-charts.suse.com/

helm repo list

helm search suse

12.准备域名解析

example.com

*.example.com

uaa.example.com

*.uaa.example.com

ssh.example.com

tcp.example.com

 

13. 创建配置文件scf-config-values.yaml

env:

  # the FQDN of your domain

  DOMAIN: xjqpro.com

  # the UAA prefix is required

  UAA_HOST: uaa.xjqpro.com

  UAA_PORT: 2793

  GARDEN_ROOTFS_DRIVER: “overlay-xfs”

 

kube:

  storage_class:

    persistent: “persistent”

    shared: “persistent”

 

  registry:

    hostname: “registry.suse.com”

    username: “”

    password: “”

  organization: “cap”

 

secrets:

  # Create a very strong password for user ‘admin’

  CLUSTER_ADMIN_PASSWORD: suse2020

 

  # Create a very strong password, and protect it because it

  # provides root access to everything

  UAA_ADMIN_CLIENT_SECRET: suse2020

 

services:

  loadbalanced: true

 

14.安装uaa

 

helm install suse/uaa \

–name susecf-uaa \

–namespace uaa \

–values scf-config-values.yaml

查看pods

 

watch –color ‘kubectl get pods –namespace uaa’

 

kubectl get services –namespace uaa | grep public

15.安装scf

SECRET=$(kubectl get pods –namespace uaa \

–output jsonpath='{.items[?(.metadata.name==”uaa-0″)].spec.containers[?(.name==”uaa”)].env[?(.name==”INTERNAL_CA_CERT”)].valueFrom.secretKeyRef.name}’)

 

CA_CERT=”$(kubectl get secret $SECRET –namespace uaa \

–output jsonpath=”{.data[‘internal-ca-cert’]}” | base64 –decode -)”

 

helm install suse/cf \

–name susecf-scf \

–namespace scf \

–values scf-config-values.yaml \

–set “secrets.UAA_CA_CERT=${CA_CERT}”

 

watch –color ‘kubectl get pods –namespace scf’

 

kubectl get services –namespace scf | grep public

16.安装stratos

cf api –skip-ssl-validation https://api.xjqpro.com

 

helm install suse/console \

–name susecf-console \

–namespace stratos \

–values scf-config-values.yaml \

–set services.loadbalanced=true

 

watch –color ‘kubectl get pods –namespace stratos’

 

kubectl get service susecf-console-ui-ext –namespace stratos

17. 登陆startos

部署一个应用

https://github.com/xjq/clumsy-bird

 

手把手教你搭建SUSE CAP视频:

https://v.qq.com/x/page/z3076pw5et4.html

 

参考资料:

https://documentation.suse.com/suse-cap/1.5.2/

 

Share
(Visited 17 times, 1 visits today)

发表评论

电子邮件地址不会被公开。 必填项已用*标注

No comments yet

Avatar photo
3,560 views