Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lidongze0629 committed Aug 14, 2024
1 parent ef06182 commit 5b0b3e6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 83 deletions.
93 changes: 12 additions & 81 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,17 @@ jobs:
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: upload_pypi/

build-interactive-image-x86-64:
build-interactive-image-amd64:
if: (github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope')
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Add envs to GITHUB_ENV
run: |
short_sha=$(git rev-parse --short HEAD)
echo "SHORT_SHA=${short_sha}" >> $GITHUB_ENV
- name: Build Interactive Image
run: |
cd ${GITHUB_WORKSPACE}/python
python3 -m pip install --upgrade pip && python3 -m pip install -r requirements.txt && python3 setup.py build_proto
cd ${GITHUB_WORKSPACE}
python3 -m pip install --upgrade pip && python3 -m pip install click
python3 ./gsctl.py flexbuild interactive --app docker
- name: Extract Tag Name
Expand All @@ -95,10 +89,10 @@ jobs:
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
sudo docker tag ${{ env.INTERACTIVE_IMAGE }}:${SHORT_SHA}-x86_64 ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}
sudo docker push ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}
sudo docker tag graphscope/interactive:latest ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-amd64
sudo docker push ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-amd64
build-gss-image-x86-64:
build-gss-image-amd64:
if: (github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope')
runs-on: ubuntu-20.04
steps:
Expand All @@ -114,25 +108,6 @@ jobs:
cd ${GITHUB_WORKSPACE}/k8s
sudo make graphscope-store VERSION=${SHORT_SHA}
- name: Release Nightly Image
# if: ${{ github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope' }}
# GraphScope-Store doesn't need nightly release yet.
# To save some resources, comment this step out temporarily.
if: false
env:
docker_password: ${{ secrets.DOCKER_PASSWORD }}
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
# docker tag: 0.15.0 -> 0.15.0a20220808
# x86_64
# arch=$(uname -m)
time=$(date "+%Y%m%d")
version=$(cat ${GITHUB_WORKSPACE}/VERSION)
tag="${version}a${time}"
sudo docker tag graphscope/graphscope-store:${SHORT_SHA} ${{ env.GSS_IMAGE }}:${tag}
sudo docker push ${{ env.GSS_IMAGE }}:${tag}
- name: Extract Tag Name
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope' }}
id: tag
Expand All @@ -145,12 +120,10 @@ jobs:
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
# x86_64
# arch=$(uname -m)
sudo docker tag graphscope/graphscope-store:${SHORT_SHA} ${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}
sudo docker push ${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}
build-gss-image-aarch64:
build-gss-image-arm64:
# if: (github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope')
if: false
runs-on: [self-hosted, Linux, ARM64]
Expand All @@ -167,25 +140,6 @@ jobs:
cd ${GITHUB_WORKSPACE}/k8s
sudo make graphscope-store VERSION=${SHORT_SHA}
- name: Release Nightly Image
# if: ${{ github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope' }}
# GraphScope-Store doesn't need nightly release yet.
# To save some resources, comment this step out temporarily.
if: false
env:
docker_password: ${{ secrets.DOCKER_PASSWORD }}
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
# docker tag: 0.15.0 -> 0.15.0a20220808
# aarch64
arch=$(uname -m)
time=$(date "+%Y%m%d")
version=$(cat ${GITHUB_WORKSPACE}/VERSION)
tag="${version}a${time}"-${arch}
sudo docker tag graphscope/graphscope-store:${SHORT_SHA} ${{ env.GSS_IMAGE }}:${tag}
sudo docker push ${{ env.GSS_IMAGE }}:${tag}
- name: Extract Tag Name
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope' }}
id: tag
Expand All @@ -198,38 +152,15 @@ jobs:
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
# aarch64
arch=$(uname -m)
sudo docker tag graphscope/graphscope-store:${SHORT_SHA} ${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}-${arch}
sudo docker push ${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}-${arch}
- name: Clean Nightly Image
if: false
run: |
# docker tag: 0.15.0 -> 0.15.0a20220808
# aarch64
arch=$(uname -m)
time=$(date "+%Y%m%d")
version=$(cat ${GITHUB_WORKSPACE}/VERSION)
tag="${version}a${time}"-${arch}
# clean
sudo docker rmi -f graphscope-store:${SHORT_SHA} || true
sudo docker rmi -f ${{ env.GSS_IMAGE }}:${tag} || true
- name: Clean Release Image
if: always()
run: |
# aarch64
arch=$(uname -m)
sudo docker rmi -f graphscope-store:${SHORT_SHA} || true
sudo docker rmi -f ${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}-${arch} || true
sudo docker tag graphscope/graphscope-store:${SHORT_SHA} ${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}-arm64
sudo docker push ${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}-arm64
push-gss-image-manifest:
# if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope' }}
if: false
runs-on: ubuntu-20.04

needs: [build-gss-image-x86-64, build-gss-image-aarch64]
needs: [build-gss-image-amd64, build-gss-image-arm64]

steps:
- uses: actions/checkout@v4
Expand All @@ -251,8 +182,8 @@ jobs:
# create
sudo docker manifest create \
${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }} \
${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}-x86_64 \
${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}-aarch64
${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}-amd64 \
${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}-arm64
# push
sudo docker manifest push ${{ env.GSS_IMAGE }}:${{ steps.tag.outputs.TAG }}
Expand Down
3 changes: 2 additions & 1 deletion k8s/dockerfiles/coordinator.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ RUN useradd -m graphscope -u 1001 \
RUN sudo mkdir -p /var/log/graphscope \
&& sudo chown -R graphscope:graphscope /var/log/graphscope

RUN curl -L -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.24.0/bin/linux/$ARCH/kubectl
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
curl -L -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.24.0/bin/linux/$arch/kubectl
RUN chmod +x /usr/bin/kubectl

COPY ./interactive_engine/assembly/src/bin/graphscope/giectl /opt/graphscope/bin/giectl
Expand Down
3 changes: 2 additions & 1 deletion k8s/dockerfiles/interactive.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ RUN sudo chmod +x /opt/hadoop-3.3.0/bin/*
# set the CLASSPATH for hadoop, must run after install java
RUN bash -l -c 'echo export CLASSPATH="$($HADOOP_HOME/bin/hdfs classpath --glob)" >> /home/graphscope/.profile'

RUN curl -L -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.19.2/bin/linux/$ARCH/kubectl
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
sudo env arch=$arch curl -L -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.19.2/bin/linux/$arch/kubectl
RUN sudo chmod +x /usr/bin/kubectl

# gaia_executor, giectl
Expand Down

0 comments on commit 5b0b3e6

Please sign in to comment.