Skip to content

Commit

Permalink
[mainfest] add docker-compose deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-0314 committed Jan 15, 2024
1 parent 6c0a645 commit f1d6d5a
Show file tree
Hide file tree
Showing 9 changed files with 1,346 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/docker-compose-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: build docker_compose

on:
push:
branches:
- main
- 'feature-**'
paths:
- 'manifests/deepflow-docker-compose/**'
tags:
- '*'
workflow_dispatch:
inputs:
ref:
description: "Why trigger?"
required: true
type: string
# release:
# branches:
# - main
# - release-*

jobs:
build_docker_compose:
name: build docker_compose
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- uses: manyuanrong/[email protected]
with:
endpoint: "oss-accelerate.aliyuncs.com"
access-key-id: "${{ secrets.ALIYUN_OSS_ACCESS_KEY }}"
access-key-secret: "${{ secrets.ALIYUN_OSS_SECRETS_KEY }}"

- name: set env
run: |
echo "IMAGE_TAG_PREFIX=${{ github.ref_name }}"|sed 's|=main$|=latest|' >> $GITHUB_ENV
echo "IMAGE_TAG=$(git rev-list --count HEAD)" >> $GITHUB_ENV
- name: upload docker-compose
run: |
cd manifests
tar -czvf deepflow-docker-compose.tar deepflow-docker-compose
ossutil cp -rf deepflow-docker-compose.tar oss://deepflow-ce/pkg/docker-compose/${{ env.IMAGE_TAG_PREFIX }}/linux/deepflow-docker-compose.tar
- name: upload docker-compose stable artifacts
if: "startsWith(github.ref, 'refs/tags/')"
run: |
cd manifests
tar -czvf deepflow-docker-compose.tar deepflow-docker-compose
ossutil cp -rf deepflow-docker-compose.tar oss://deepflow-ce/pkg/docker-compose/stable/linux/deepflow-docker-compose.tar
# - name: Prepare for upload package
# shell: bash
# run: |
# sha256sum dist/* > deepflow-agent.sha256sum.txt

# - name: Release and upload packages
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# files: |
# deepflow-agent.sha256sum.txt
# dist/*
16 changes: 16 additions & 0 deletions manifests/deepflow-docker-compose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# DeepFlow STANDALONE mode docker-compose deployment package

## Usage

```console
unset DOCKER_HOST_IP
DOCKER_HOST_IP="10.1.2.3" # FIXME: Deploy the environment machine IP
wget https://deepflow-ce.oss-cn-beijing.aliyuncs.com/pkg/docker-compose/stable/linux/deepflow-docker-compose.tar
tar -zxf deepflow-docker-compose.tar
sed -i "s|FIX_ME_ALLINONE_HOST_IP|$DOCKER_HOST_IP|g" deepflow-docker-compose/docker-compose.yaml
docker-compose -f deepflow-docker-compose/docker-compose.yaml up -d
```

## License

[Apache 2.0 License](../../LICENSE).
Loading

0 comments on commit f1d6d5a

Please sign in to comment.