k8s一键部署uniswap

news2024/11/17 7:41:21

1、拉取uniswap源码
github地址
2、编写Dockerfile并打镜像

# Set the base image
FROM node:18.10.0

# WORKDIR /usr/src/app/
WORKDIR /home/gateway

# Copy files
COPY ./ /home/gateway/

# Dockerfile author / maintainer
LABEL maintainer="Michael Feng <mike@hummingbot.org>"

# Build arguments
LABEL branch=${BRANCH}
LABEL commit=${COMMIT}
LABEL date=${BUILD_DATE}

# Set ENV variables
ENV COMMIT_BRANCH=${BRANCH}
ENV COMMIT_SHA=${COMMIT}
ENV BUILD_DATE=${DATE}
ENV INSTALLATION_TYPE=docker

# Create mount points
RUN mkdir -p /home/gateway/conf /home/gateway/logs /home/gateway/db /home/gateway/certs /home/gateway/conf/lists

COPY src/templates/lists/*.json /home/gateway/conf/lists/
COPY src/templates/*.yml /home/gateway/conf/
#COPY certs/*.pem /home/gateway/certs/

# Install dependencies and compile
RUN yarn install --frozen-lockfile
RUN yarn build

# Expose port 15888 - note that docs port is 8080
EXPOSE 15888

# Set the default command to run when starting the container
CMD yarn run start

3、创建pem证书文件(因为创建证书需要第三方工具,这边就给出一份创建好了的证书)
k8s创建configmap yaml文件如下
uniswap-gateway-key.yml

---
apiVersion: v1
data:
  ca_cert.pem: >-
    LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM4VENDQWRtZ0F3SUJBZ0lVUk5jSm1FR3FGK095bGVaZ003TnNUcWhVUEprd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0tERVNNQkFHQTFVRUNnd0piRzlqWVd4b2IzTjBNUkl3RUFZRFZRUUREQWxzYjJOaGJHaHZjM1F3SGhjTgpNak13T1RBeE1USTBNekE1V2hjTk1qUXdPRE14TVRJME16QTVXakFvTVJJd0VBWURWUVFLREFsc2IyTmhiR2h2CmMzUXhFakFRQmdOVkJBTU1DV3h2WTJGc2FHOXpkRENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0MKQVFvQ2dnRUJBS1g5T2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cTNLekVUSEZCMDdBWjN2OUxiNCt2dFkyaFlYcDVnUW5JVkxMeWRNRWIKUXZCSUJpTWhGOFRxUnBIS01qTmxuMjVQdy9nODhnS1RHQjZ1czAxbzB6MUR4dkpvTjN6NTdXWlRtaEJ6aGhVMwpFcjQ2MThyRWU3V2VRNVdLZ1pmZTREMTFqTW8xZFJvSmxhODcxWHdkYmI2eS9pMWpQbzVjbXdRbDN3Vm5aT0JjCi9qWWN0QnE0eHg5cFBDWGhLV210eTgvdDRsQ2RIT0gwTUNURlJVYkpJaFl5d3UzbHZFQjFKcHBnM3pVVWlESTMKQ3Z4eHR1YWJ6QXZtaHNaZ1VFUGFRcHNKeHhhMmxUN3NnaGZUVDNjR095TmtqV2JKTFZYWXBLV0MrdDBMRTJDRAozYVZXVXFYUzB1MElaeUNrYVpIMktuWHROcW1KZzhqUFYvRkE4S3I2K3grcS9MRUpWZDM4eXg5VytKNXRzQlhSCnFCckc5YWFZaTgyRUtqNTY2andIVHpBTE01cDh1QzRMbjdPUFRmQmNlUDc1alM4dk9WcDdhek1QY25BVlNPcTIKUzcvcDlZVUg0em5LekkvRnllZFk3TXU3WWxvUEtXZXRDUzVUcFpMVXFaTlkzRFhOS1k4YXpIcm9XRTBoWnpzdQpjN1BIanVRMk5qdUREdDdacS9FeFVBdnN5MXQvOWFLK0VKcFFFcVhFdGZtQ0Q1UU02TFU0TEZ4d3Y3cE5QMDg1CkY5c3NqVlpraldmaGZ3OCs1dXNaSXF4Q2k2clBVcHd2WnVTcU8rd29PNDN5UzM0L043TDdUNHVDdHVzRTNFaVMKTjErTS9lQlhQSUpzU1R1RlpFdGZleXlOaEduVk15WlIvdTNyTmVud2hJTEcrUkxOakNQQ2JiSVVzaG8xejBQVgotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQ==
immutable: false
kind: Secret
metadata:
  name: uniswap-gateway-key
  namespace: biking
  resourceVersion: '102621410'
type: Opaque

4、编写创建uniswap.yaml文件

---
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    k8s.kuboard.cn/displayName: uniswap-node
  labels:
    k8s.kuboard.cn/layer: gateway
    k8s.kuboard.cn/name: uniswap-node
  name: gateway-node
  namespace: uniswap
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      k8s.kuboard.cn/name: uniswap-node
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        k8s.kuboard.cn/name: uniswap-node
    spec:
      containers:
        - command:
            - yarn
            - start
            - '--passphrase=Welcome123'
          env:
            - name: TZ
              value: Asia/Shanghai
            - name: NACOS
              value: X.X.X.X
          image: 'registry-intl.cn-hongkong.aliyuncs.com/abc/uniswap-node:v1.0'
          imagePullPolicy: Always
          name: gateway-node
          ports:
            - containerPort: 15888
              name: msag7
              protocol: TCP
            - containerPort: 8080
              name: dfdg
              protocol: TCP
          resources: {}
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
            - mountPath: /home/gateway/logs
              name: volume-miafx
              subPath: gateway-node
            - mountPath: /home/gateway/certs
              name: volume-xw5yj
          workingDir: /home/gateway
      dnsPolicy: ClusterFirst
      imagePullSecrets:
        - name: harbor-secret
        - name: acr-secret
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
        - name: volume-miafx
          persistentVolumeClaim:
            claimName: uniswap-logs
        - name: volume-xw5yj
          secret:
            defaultMode: 420
            secretName: uniswap-gateway-key
---
apiVersion: v1
kind: Service
metadata:
  annotations: {}
  labels:
    k8s.kuboard.cn/layer: gateway
    k8s.kuboard.cn/name: uniswap-node
  name: uniswap-node
  namespace: biking
  resourceVersion: '90935018'
spec:
  ports:
    - name: kjmfca
      port: 15888
      protocol: TCP
      targetPort: 15888
    - name: zby2ps
      port: 8080
      protocol: TCP
      targetPort: 8080
  selector:
    k8s.kuboard.cn/name: uniswap-node
  sessionAffinity: None
  type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/cors-allow-headers: >-
      DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type
    nginx.ingress.kubernetes.io/cors-allow-methods: 'GET, POST, PUT, DELETE, OPTIONS'
    nginx.ingress.kubernetes.io/cors-allow-origin: '*'
    nginx.ingress.kubernetes.io/cors-expose-headers: 'Content-Length,Content-Type'
    nginx.ingress.kubernetes.io/enable-cors: 'true'
    nginx.ingress.kubernetes.io/force-ssl-redirect: 'true'
    nginx.ingress.kubernetes.io/from-to-www-redirect: 'false'
  labels:
    k8s.kuboard.cn/layer: gateway
    k8s.kuboard.cn/name: uniswap-node
  name: gateway-node
  namespace: biking
  resourceVersion: '90938206'
spec:
  ingressClassName: nginx
  rules:
    - host: uniswap-node.abc.com
      http:
        paths:
          - backend:
              service:
                name: uniswap-node
                port:
                  number: 15888
            path: /
            pathType: Prefix
  tls:
    - hosts:
        - uniswap-node.abc.com
      secretName: abc.com-ssl

5、启动好了uniswap时,我们在登录容器内部后通过curl进行测试
在这里插入图片描述

curl -s -X GET -k --key certs/server_key.pem --cert certs/server_cert.pem https://localhost:15888/ 
Enter PEM pass phrase: (Welcome123)
{"status":"ok"}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1303350.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

VSCode使用Remote-SSH连接服务器时报错:无法与“***”建立连接: XHR failed.

关于VSCode的报错问题&#xff1a;无法与“***”建立连接: XHR failed 问题描述问题理解解决方法手动在本地下载安装包&#xff0c;然后手动传到服务器端 问题描述 是的&#xff0c;我又踩坑了&#xff0c;而且这个弄了好久&#xff0c;也重新装了VSCode软件&#xff0c;好像结…

IDEA 2023.3 start failed 启动失败修复

发现是 RestfulToolkit 插件有冲突导致的&#xff0c;删除插件后成功启动 open ~/Library/Application\ Support/JetBrains/IntelliJIdea2023.3/plugins参考&#xff1a;https://youtrack.jetbrains.com/issue/IDEA-340080/Critical-startup-error-after-upgrading-to-Intelli…

Xxl-Job在Linux环境下安装部署

文章目录 Xxl-Job简介环境准备安装下载安装包解压安装包初始化数据库文件修改配置文件打包启动 访问 Xxl-Job简介 Xxl-Job是一个分布式任务调度平台&#xff0c;作者是美团的研发工程师许雪里&#xff0c;Xxl命名的由来盲猜是作者的名字首字母&#xff0c;Job为任务。 环境准…

深入理解模板引擎:解锁 Web 开发的新境界(上)

&#x1f90d; 前端开发工程师&#xff08;主业&#xff09;、技术博主&#xff08;副业&#xff09;、已过CET6 &#x1f368; 阿珊和她的猫_CSDN个人主页 &#x1f560; 牛客高级专题作者、在牛客打造高质量专栏《前端面试必备》 &#x1f35a; 蓝桥云课签约作者、已在蓝桥云…

服务器数据恢复—raid5少盘状态下新建raid5如何恢复原raid5数据?

服务器数据恢复环境&#xff1a; 一台服务器上搭建了一组由5块硬盘组建的raid5阵列&#xff0c;服务器上层存放单位重要数据&#xff0c;无备份文件。 服务器故障&分析&#xff1a; 服务器上raid5有一块硬盘掉线&#xff0c;外聘运维人员在没有了解服务器具体情况下&#x…

【C语言程序设计】顺序结构程序设计

目录 前言 一、程序阅读 二、程序改错 三、程序设计 &#x1f308;嗨&#xff01;我是Filotimo__&#x1f308;。很高兴与大家相识&#xff0c;希望我的博客能对你有所帮助。 &#x1f4a1;本文由Filotimo__✍️原创&#xff0c;首发于CSDN&#x1f4da;。 &#x1f4e3;如需转…

简单的 u-popup 弹出框

uniapp中的popup组件可以用于弹出简单的提示框、操作框、菜单等。它可以通过position属性控制弹出框的位置&#xff0c;不同的position值会使得弹出框呈现不同的弹出形式 目录 一、实现思路 二、实现步骤 ①view部分展示 ②JavaScript 内容 ③css中样式展示 三、效果展示 …

计算机网络:网络层上(数据平面)

文章目录 前言一、概述1.网络服务模型2.连接建立 二、路由器组成路由器结构概况输入端口的功能交换结构输出端口 三、IP&#xff08;Internet Protocol&#xff09;IPV4IPV6 四、通用转发和SDN总结 前言 网络层分两部分讲解&#xff0c;本篇文章讲解数据平面的内容&#xff1a…

Spring Boot监听redis过期的key

Redis支持过期监听&#xff0c;可以实现监听过期数据&#xff0c;实现过程如下 1、pom依赖 <!-- Redis--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId></depend…

计算机网络(三)

&#xff08;十一&#xff09;路由算法 A、路由算法分类 动态路由和静态路由 静态路由&#xff1a;人工配制&#xff0c;路由信息更新慢&#xff0c;优先级高。这种在实际网络中要投入成本大&#xff0c;准确但是可行性弱。 动态路由&#xff1a;路由更新快&#xff0c;自动…

【MySQL】:数据类型

数据类型 一.数值类型1.整数1.tinyint2.bit类型 2.浮点类型1.float2.decimal 二.字符串类型1.char类型2.varchar类型3.char和varchar的区别4.日期和时间类型5.enum和set 三.集合查询 一.数值类型 1.整数 1.tinyint 正常插入 越界插入 如果我们向mysql特定的类型中插入不合法的…

使用BeautifulSoup 4和Pillow合并网页图片到一个PDF:一种高效的方式来处理网页图像

背景 ​ 网页上的培训材料&#xff0c;内容全是PPT页面图片。直接通过浏览器打印&#xff0c;会存在只打印第一页&#xff0c;并且把浏览器上无效信息也打印出来情况。但目标是希望将页面图片全部打印为pdf形式。 实现方案 利用网页“另存为”&#xff0c;将页面内所有图片资…

力扣题:数字与字符串间转换-12.12

力扣题-12.12 [力扣刷题攻略] Re&#xff1a;从零开始的力扣刷题生活 力扣题1&#xff1a;539. 最小时间差 解题思想&#xff1a;将字符串的时间形式换成数字形式的时间&#xff0c;然后计算差值即可&#xff0c;最重要的是最小的值加上一天的时间加入到数组最后&#xff08…

cache教程 5.分布式节点的通信

0.对原教程的一些见解 其回顾完请求流程就是抽象了两个接口&#xff0c;PeerPicker和PeerGetter。这样操作&#xff0c;读者阅读时可能很难快速明白其含义&#xff0c;不好理解为什么就创建出两个接口&#xff0c;感觉会比较疑惑。原教程的评论中也有讨论这点。 本教程就先不创…

docker mysql8 设置不区分大小写

docker安装Mysql8.0的坑之lower_case_table_names_docker mysql lower_case_table_names-CSDN博客https://blog.csdn.net/p793049488/article/details/108365929 docker run ‐di ‐‐nametensquare_mysql ‐p 33306:3306 ‐e MYSQL_ROOT_PASSWORD123456 mysql

node.js express JWT token生成与校验

目录 JWT header&#xff08;标头&#xff09; payload&#xff08;有效负载&#xff09; signature&#xff08;签名&#xff09; 访问令牌&#xff08;token&#xff09; express jwt生成、验证 生成jwt 验证jwt JWT JWT 是轻量级的数据交换格式&#xff0c;相对于传…

微服务-理论 分布式事务

一、分布式事务理论模型 分布式事务问题也叫分布式数据一致性问题&#xff0c;简单来说就是如何在分布式场景中保证多个节点数据的一致性。分布式事务产生的核心原因在于存储资源的分布性&#xff0c;比如多个数据库&#xff0c;或者MySQL和Redis两种不同存储设备的数据一致性…

R语言,table()函数实现统计每个元素出现的频数+并将最终统计频数结果转换成dataframe数据框形式

在 R中&#xff0c;要统计dataframe数据框中每个元素出现的频数&#xff0c;可以使用table()函数。以下是一个示例&#xff1a; 目录 一、创建数据 二、统计第一列每个元素出现的频数 三、统计第二列每个元素出现的频数 四、将频数结果转换为数据框&#xff0c;并改列名 一…

【OPNEGIS】Geoserver原地升级jetty,解决Apache HTTP/2拒绝服务漏洞 (CVE-2023-44487)

Geoserver是我们常用的地图服务器&#xff0c;在开源系统中的应用比较广泛。在实际环境中&#xff0c;我们可能会选用官方的二进制安装包进行部署&#xff0c;这样只要服务器上有java环境就可以运行&#xff0c;方便在现场进行部署。 1.问题来源 这次由于甲方一月一次的漏洞扫…

开源框架Apache NiFi调研

开源框架Apache NiFi调研 NiFi背景介绍一、什么是NiFi1.1 Apache NiFi特点&#xff1a;流管理、易用性、安全性、可扩展的体系结构和灵活的伸缩模型。1.2 Apache NiFi特性1.2 Apache NiFi核心概念1.3架构 二、NiFi的诞生&#xff0c;要致力于解决的问题有哪些&#xff1f;三、为…