69
.github/workflows/mainnet-beta.yml
vendored
Normal file
69
.github/workflows/mainnet-beta.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
name: DLOB Build Image And Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [mainnet-beta]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubicloud
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
|
||||||
|
- name: Configure AWS credentials
|
||||||
|
uses: aws-actions/configure-aws-credentials@master
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_PROD }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_PROD }}
|
||||||
|
aws-region: ${{ secrets.EKS_PROD_REGION }}
|
||||||
|
|
||||||
|
- name: Log in to Amazon ECR
|
||||||
|
id: login-ecr
|
||||||
|
uses: aws-actions/amazon-ecr-login@v2
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
env:
|
||||||
|
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
||||||
|
ECR_REPOSITORY: dlob-server
|
||||||
|
IMAGE_TAG: ${{ github.sha }}
|
||||||
|
BRANCH_NAME: ${{ github.ref_name }}
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}-${{ env.BRANCH_NAME }}-amd64
|
||||||
|
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest-${{ env.BRANCH_NAME }}-amd64
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
runs-on: ubicloud
|
||||||
|
needs: [build]
|
||||||
|
steps:
|
||||||
|
- name: Configure AWS credentials
|
||||||
|
uses: aws-actions/configure-aws-credentials@master
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_PROD }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_PROD }}
|
||||||
|
aws-region: ${{ secrets.EKS_PROD_REGION }}
|
||||||
|
|
||||||
|
- name: Install kubectl
|
||||||
|
uses: azure/setup-kubectl@v3
|
||||||
|
with:
|
||||||
|
version: 'v1.30.0'
|
||||||
|
|
||||||
|
- name: Configure AWS EKS Credentials
|
||||||
|
run: aws eks update-kubeconfig --name ${{ secrets.EKS_PROD_CLUSTER_NAME }} --region ${{ secrets.EKS_PROD_REGION }} --role-arn ${{ secrets.EKS_PROD_DEPLOY_ROLE }}
|
||||||
|
|
||||||
|
- name: Restart deployment
|
||||||
|
env:
|
||||||
|
BRANCH_NAME: ${{ github.ref_name }}
|
||||||
|
run: |
|
||||||
|
kubectl get deployments -n $BRANCH_NAME -o name | grep '^deployment.apps/dlob-publisher-app' | xargs -I {} kubectl rollout restart {} -n $BRANCH_NAME
|
||||||
|
kubectl rollout restart -n $BRANCH_NAME deployment/dlob-server-app
|
||||||
|
kubectl rollout restart -n $BRANCH_NAME deployment/dlob-server-lite-app
|
||||||
|
kubectl rollout restart -n $BRANCH_NAME deployment/dlob-ws-connection-manager-app
|
||||||
|
kubectl rollout restart -n $BRANCH_NAME deployment/dlob-trades-publisher-app
|
||||||
|
kubectl rollout restart -n $BRANCH_NAME deployment/dlob-priority-fees-publisher-app
|
||||||
2
.github/workflows/master.yml
vendored
2
.github/workflows/master.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
|
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}-${{ env.BRANCH_NAME }}-amd64
|
||||||
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest-${{ env.BRANCH_NAME }}-amd64
|
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest-${{ env.BRANCH_NAME }}-amd64
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
|||||||
@@ -324,29 +324,34 @@ const main = async () => {
|
|||||||
let accountSubscription: DriftClientSubscriptionConfig;
|
let accountSubscription: DriftClientSubscriptionConfig;
|
||||||
let slotSource: SlotSource;
|
let slotSource: SlotSource;
|
||||||
|
|
||||||
|
// NOTE: disable GRPC for general driftClient subscriptions until we can reliably subscribe
|
||||||
|
// to multiple streams. Currently this causes the nodes to start killing connections.
|
||||||
|
//
|
||||||
// USE_GRPC=true will override websocket
|
// USE_GRPC=true will override websocket
|
||||||
if (useGrpc) {
|
// if (useGrpc) {
|
||||||
accountSubscription = {
|
// accountSubscription = {
|
||||||
type: 'grpc',
|
// type: 'grpc',
|
||||||
resubTimeoutMs: 30_000,
|
// resubTimeoutMs: 30_000,
|
||||||
grpcConfigs: {
|
// grpcConfigs: {
|
||||||
endpoint,
|
// endpoint,
|
||||||
token,
|
// token,
|
||||||
channelOptions: {
|
// channelOptions: {
|
||||||
'grpc.keepalive_time_ms': 10_000,
|
// 'grpc.keepalive_time_ms': 10_000,
|
||||||
'grpc.keepalive_timeout_ms': 1_000,
|
// 'grpc.keepalive_timeout_ms': 1_000,
|
||||||
'grpc.keepalive_permit_without_calls': 1,
|
// 'grpc.keepalive_permit_without_calls': 1,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
};
|
// };
|
||||||
|
|
||||||
slotSubscriber = new SlotSubscriber(connection);
|
// slotSubscriber = new SlotSubscriber(connection);
|
||||||
await slotSubscriber.subscribe();
|
// await slotSubscriber.subscribe();
|
||||||
|
|
||||||
slotSource = {
|
// slotSource = {
|
||||||
getSlot: () => slotSubscriber!.getSlot(),
|
// getSlot: () => slotSubscriber!.getSlot(),
|
||||||
};
|
// };
|
||||||
} else if (!useWebsocket) {
|
// }
|
||||||
|
|
||||||
|
if (!useWebsocket) {
|
||||||
bulkAccountLoader = new BulkAccountLoader(
|
bulkAccountLoader = new BulkAccountLoader(
|
||||||
connection,
|
connection,
|
||||||
stateCommitment,
|
stateCommitment,
|
||||||
|
|||||||
Reference in New Issue
Block a user