Smart contracts原力佛萨奇2.0源码系统开发成熟技术

简介: Smart contracts原力佛萨奇2.0源码系统开发成熟技术

初始化 master 节点
首先获取 master 主机的内网 IP 地址,一般在云主机厂商的控制面板上都会显示内网地址,也可以使用 ifconfig 命令查看:

$ ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500

    inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
    ether 02:42:6b:8e:de:02  txqueuelen 0  (Ethernet)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

    inet 172.31.117.60  netmask 255.255.240.0  broadcast 172.31.127.255
    ether 00:16:3e:00:b7:03  txqueuelen 1000  (Ethernet)
    RX packets 208023  bytes 307062112 (292.8 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 39362  bytes 3275173 (3.1 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536

    inet 127.0.0.1  netmask 255.0.0.0
    loop  txqueuelen 1000  (Local Loopback)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

172.31.117.60 是 master eth0 私有地址,在 master 上执行:

$ kubeadm init --apiserver-advertise-address 172.31.117.60 --pod-network-cidr=10.244.0.0/16
I0304 22:52:00.565539 2424 version.go:252] remote version is much newer: v1.20.4; falling back to: stable-1.19
W0304 22:52:00.960003 2424 configset.go:348] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[init] Using Kubernetes version: v1.19.8
[preflight] Running pre-flight checks

[WARNING Service-Docker]: docker service is not enabled, please run 'systemctl enable docker.service'
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.5. Latest validated version: 19.03

[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[certs] Generating "ca" certificate and key
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [k8s-master kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 172.31.117.60]
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "front-proxy-ca" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "etcd/ca" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [k8s-master localhost] and IPs [172.31.117.60 127.0.0.1 ::1]
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [k8s-master localhost] and IPs [172.31.117.60 127.0.0.1 ::1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
[kubeconfig] Writing "admin.conf" kubeconfig file
[kubeconfig] Writing "kubelet.conf" kubeconfig file
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Starting the kubelet
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
[control-plane] Creating static Pod manifest for "kube-scheduler"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[apiclient] All control plane components are healthy after 16.002210 seconds
[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[kubelet] Creating a ConfigMap "kubelet-config-1.19" in namespace kube-system with the configuration for the kubelets in the cluster
[upload-certs] Skipping phase. Please see --upload-certs
[mark-control-plane] Marking the node k8s-master as control-plane by adding the label "node-role.kubernetes.io/master=''"
[mark-control-plane] Marking the node k8s-master as control-plane by adding the taints [node-role.kubernetes.io/master:NoSchedule]
[bootstrap-token] Using token: 3wfvhr.zcstqjk1cr3ehft4
[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to get nodes
[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[bootstrap-token] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstrap-token] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
[bootstrap-token] Creating the "cluster-info" ConfigMap in the "kube-public" namespace
[kubelet-finalize] Updating "/etc/kubernetes/kubelet.conf" to point to a rotatable kubelet client certificate and key
[addons] Applied essential addon: CoreDNS
[addons] Applied essential addon: kube-proxy

Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
https://kubernetes.io/docs/concepts/cluster-administration/addons/

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join 172.31.117.60:6443 --token 3wfvhr.zcstqjk1cr3ehft4 \

--discovery-token-ca-cert-hash sha256:07e2d554d807a5012a9dba6718b28081be235c2826ae2ffd0ee4c38a344f98f4
相关实践学习
深入解析Docker容器化技术
Docker是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux机器上,也可以实现虚拟化,容器是完全使用沙箱机制,相互之间不会有任何接口。Docker是世界领先的软件容器平台。开发人员利用Docker可以消除协作编码时“在我的机器上可正常工作”的问题。运维人员利用Docker可以在隔离容器中并行运行和管理应用,获得更好的计算密度。企业利用Docker可以构建敏捷的软件交付管道,以更快的速度、更高的安全性和可靠的信誉为Linux和Windows Server应用发布新功能。 在本套课程中,我们将全面的讲解Docker技术栈,从环境安装到容器、镜像操作以及生产环境如何部署开发的微服务应用。本课程由黑马程序员提供。 &nbsp; &nbsp; 相关的阿里云产品:容器服务 ACK 容器服务 Kubernetes 版(简称 ACK)提供高性能可伸缩的容器应用管理能力,支持企业级容器化应用的全生命周期管理。整合阿里云虚拟化、存储、网络和安全能力,打造云端最佳容器化应用运行环境。 了解产品详情: https://www.aliyun.com/product/kubernetes
相关文章
|
Web App开发 存储 移动开发
IRS应用发布之应用调试
Debug调试工具支持日志查询和前端页面调试:
IRS应用发布之应用调试
|
10月前
|
数据处理 数据格式
在Excel中,有没有办法一次性复制粘贴多列数据?
在Excel中,有没有办法一次性复制粘贴多列数据?
1909 1
|
9月前
|
存储 移动开发 小程序
基于Uniapp的会员卡储值消费系统开发实践
本文介绍如何用Uniapp快速搭建轻量化会员卡储值消费系统,适配餐饮、校园、社区等线下场景。依托跨端能力,一套代码覆盖小程序/H5/App;聚焦自助充消、分级折扣、交易溯源、消息通知四大核心功能,兼顾易用性与低维护成本,并推荐开源项目助力快速落地。
703 1
|
5月前
|
人工智能 文字识别 前端开发
RPA 实战:滑块验证码、登录弹窗、动态页面通用处理方案
本文针对RPA自动化中三大顽疾——滑块验证码、登录弹窗、动态页面加载,提供经生产验证的实战方案:基于ddddocr实现高精度缺口识别与拟人化滑动轨迹;通过异常捕获+多 selector 智能弹窗感知;采用轮询检测+网络监听应对Ajax懒加载;辅以指纹浏览器、行为模拟与AI元素自愈,全面提升脚本鲁棒性与拟真度。
|
6月前
|
人工智能 运维 安全
Hermes Agent 核心必学:SubAgent 子代理的 5 个实战技巧,多任务处理效率翻倍
Hermes Agent SubAgent子代理完整教程:掌握delegate_task并行委派、上下文隔离与多任务处理核心能力,提升开发效率。
1372 1
|
存储
半自动:图床解决方案,使用115当图床使用 获取图片直链
半自动:图床解决方案,使用115当图床使用 获取图片直链
1107 5
|
弹性计算 Devops Shell
用阿里云 DevOps Flow 实现 ECS 部署自动化:从准备到落地的完整指南
阿里云 DevOps Flow 是一款助力开发者实现自动化部署的高效工具,支持代码流水线构建、测试与部署至ECS实例,显著提升交付效率与稳定性。本文详解如何通过 Flow 自动部署 Bash 脚本至 ECS,涵盖环境准备、流水线搭建、源码接入、部署流程设计及结果验证,助你快速上手云上自动化运维。
1173 0
|
机器学习/深度学习 存储 人工智能
算力资源选择指南:如何匹配你的开发需求?
本文作者结合七年分布式计算经验,深入剖析算力卡与服务器的本质区别及其选型策略。从硬件架构看,算力卡专注高性能计算,如A100/H100在矩阵运算效率上提升显著,但文件读写较弱;服务器则是全能型系统,适合多任务场景。在应用场景中,算力卡适用于机器学习训练等浮点密集任务,而服务器在部署和服务支持上更具优势。成本模型显示,算力卡三年TCO更低但运维成本更高,需根据实际需求权衡。最后,作者提供选型决策树,建议根据任务类型、生态需求和负载特征选择合适方案。
879 8
|
JSON 安全 API
技术探索 | 淘宝平台商品评论数据获取方法与接口浅析
本文探讨获取淘宝商品评论数据的合规与技术路径,涵盖官方API申请、非官方接口逆向分析及爬虫实现难点,强调遵守平台规则与数据安全法规,建议优先采用合法渠道或第三方服务替代。
1015 0
|
数据采集 人工智能 Ubuntu
MyEMS开源能源管理系统开发工具
MyEMS 是一款基于 ISO 50001 标准的开源能源管理系统,支持建筑、工厂等场景的电、水、气等能源数据采集与分析,提供光伏、储能、微电网、AI 优化等功能。系统采用开源工具开发,包括 PyCharm、VS Code、Docker、Ubuntu 等,并搭配 MySQL 数据库及 DBeaver 客户端,助力企业实现低碳发展。社区版完全免费,适合开发者学习和部署。下载地址:[https://gitee.com/myems/myems](./https://gitee.com/myems/myems)。
926 32