From f64a51871291af2c0b1e40ba57e650c814807a5d Mon Sep 17 00:00:00 2001 From: ActivePeter <1020401660@qq.com> Date: Wed, 20 Mar 2024 01:18:03 +0800 Subject: [PATCH] test --- .github/workflows/ci.yml | 6 +- DEPLOY.md | 19 --- ...yml => 1.1.1_ans_build_demo_apps_each.yml} | 0 scripts/build/1.1._ans_build_demo_apps.yml | 8 ++ ..._need_data.py => 1.2_gen_app_need_data.py} | 0 ...pps.yml => 1._ans_build_sys_with_apps.yml} | 34 ++--- scripts/build/ans_build_demo_apps.yml | 11 -- scripts/build/run_ans_build_demo_apps.sh | 2 - scripts/build/run_node.py | 23 ++++ scripts/deploy_cluster/.gitignore | 2 +- ...ompose.py => 2.1_gen_each_node_compose.py} | 10 +- .../deploy_cluster/2.ans_redeploy_cluster.sh | 2 + ...cluster.yml => 2.ans_redeploy_cluster.yml} | 120 ++++++++---------- .../2.run_ans_redeploy_cluster.sh | 2 - scripts/deploy_single_node/.gitignore | 2 +- scripts/deploy_single_node/1.ans_build.sh | 3 + scripts/deploy_single_node/1.ans_build.yml | 32 +++++ scripts/deploy_single_node/ans_build.yml | 52 -------- scripts/deploy_single_node/node_config.yaml | 4 +- scripts/deploy_single_node/run_ans_build.sh | 3 - scripts/deploy_single_node/run_node.sh | 8 -- .../test_dir/files/node_config.yaml | 7 - .../Waverless/wasm_serverless_entrypoint.sh | 5 - ...thon_and_ansible.sh => 1.install_basic.sh} | 10 ++ ...medge.yml => 2.1_ans_install_wasmedge.yml} | 0 ...all_build.yml => 2._ans_install_build.yml} | 4 +- scripts/install/2.ans_install_build.sh | 2 + ...tall_build.yml => 2.ans_install_build.yml} | 2 +- ...{install_docker.sh => 3.install_docker.sh} | 0 scripts/install/run_ans_install_build.sh | 2 - 30 files changed, 173 insertions(+), 202 deletions(-) delete mode 100644 DEPLOY.md rename scripts/build/{_ans_build_demo_apps_each.yml => 1.1.1_ans_build_demo_apps_each.yml} (100%) create mode 100644 scripts/build/1.1._ans_build_demo_apps.yml rename scripts/build/{_gen_app_need_data.py => 1.2_gen_app_need_data.py} (100%) rename scripts/build/{_ans_build_sys_with_apps.yml => 1._ans_build_sys_with_apps.yml} (58%) delete mode 100644 scripts/build/ans_build_demo_apps.yml delete mode 100644 scripts/build/run_ans_build_demo_apps.sh create mode 100644 scripts/build/run_node.py rename scripts/deploy_cluster/{_gen_each_node_compose.py => 2.1_gen_each_node_compose.py} (89%) create mode 100644 scripts/deploy_cluster/2.ans_redeploy_cluster.sh rename scripts/deploy_cluster/{ans_redeploy_cluster.yml => 2.ans_redeploy_cluster.yml} (72%) delete mode 100644 scripts/deploy_cluster/2.run_ans_redeploy_cluster.sh create mode 100644 scripts/deploy_single_node/1.ans_build.sh create mode 100644 scripts/deploy_single_node/1.ans_build.yml delete mode 100644 scripts/deploy_single_node/ans_build.yml delete mode 100644 scripts/deploy_single_node/run_ans_build.sh delete mode 100644 scripts/deploy_single_node/run_node.sh delete mode 100644 scripts/deploy_single_node/test_dir/files/node_config.yaml rename scripts/install/{install_python_and_ansible.sh => 1.install_basic.sh} (94%) rename scripts/install/{_ans_install_wasmedge.yml => 2.1_ans_install_wasmedge.yml} (100%) rename scripts/install/{_ans_install_build.yml => 2._ans_install_build.yml} (91%) create mode 100644 scripts/install/2.ans_install_build.sh rename scripts/install/{ans_install_build.yml => 2.ans_install_build.yml} (72%) rename scripts/install/{install_docker.sh => 3.install_docker.sh} (100%) delete mode 100644 scripts/install/run_ans_install_build.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1fa8cb..943d3e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,13 +16,13 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Ansible - run: sudo bash scripts/install/install_python_and_ansible.sh + run: sudo bash scripts/install/1.install_basic.sh - name: Install build - run: ansible-playbook -vvv scripts/install/ans_install_build.yml -i scripts/local_ansible_conf.ini + run: ansible-playbook -vvv scripts/install/2.ans_install_build.yml -i scripts/local_ansible_conf.ini - name: Build Locally - run: ansible-playbook -vvv scripts/deploy_single_node/ans_build.yml -i scripts/local_ansible_conf.ini + run: ansible-playbook -vvv scripts/deploy_single_node/1.ans_build.yml -i scripts/local_ansible_conf.ini - name: Integirty Test run: ansible-playbook -vvv scripts/ans_integity_test.yml -i scripts/local_ansible_conf.ini diff --git a/DEPLOY.md b/DEPLOY.md deleted file mode 100644 index cace6e2..0000000 --- a/DEPLOY.md +++ /dev/null @@ -1,19 +0,0 @@ -## Multi Nodes - -1. First clone this project on master node - -2. Ansible install with `scripts/install/install_ansible.sh` (need python) - -3. Docker swarm init, join others to master (TODO: make auto) - -4. Config the `scripts/deploy_cluster/node_config.yaml` each service - -5. Set up ssh interflow and ansible node info `python scripts/deploy_cluster/1.ansible_setup.py` - -6. Redploy `2.redeploy.sh` - -## Single Node - -1. `bash scripts/deploy_single_node/run_ans_build.sh` - -2. `bash scripts/deploy_single_node/run_node.sh {NODE_ID}` \ No newline at end of file diff --git a/scripts/build/_ans_build_demo_apps_each.yml b/scripts/build/1.1.1_ans_build_demo_apps_each.yml similarity index 100% rename from scripts/build/_ans_build_demo_apps_each.yml rename to scripts/build/1.1.1_ans_build_demo_apps_each.yml diff --git a/scripts/build/1.1._ans_build_demo_apps.yml b/scripts/build/1.1._ans_build_demo_apps.yml new file mode 100644 index 0000000..f486e5e --- /dev/null +++ b/scripts/build/1.1._ans_build_demo_apps.yml @@ -0,0 +1,8 @@ +- name: Copy wasm + include_tasks: "../build/1.1.1_ans_build_demo_apps_each.yml" + loop: + - fn2 + - word_count + - longchain +- name: App needed data + shell: python3 ../build/1.2_gen_app_need_data.py \ No newline at end of file diff --git a/scripts/build/_gen_app_need_data.py b/scripts/build/1.2_gen_app_need_data.py similarity index 100% rename from scripts/build/_gen_app_need_data.py rename to scripts/build/1.2_gen_app_need_data.py diff --git a/scripts/build/_ans_build_sys_with_apps.yml b/scripts/build/1._ans_build_sys_with_apps.yml similarity index 58% rename from scripts/build/_ans_build_sys_with_apps.yml rename to scripts/build/1._ans_build_sys_with_apps.yml index 9d87508..12a9737 100644 --- a/scripts/build/_ans_build_sys_with_apps.yml +++ b/scripts/build/1._ans_build_sys_with_apps.yml @@ -13,37 +13,41 @@ bash /tmp/compile.sh rm -f /tmp/compile.sh - name: Build the demo apps - shell: ansible-playbook -vvv build/ans_build_demo_apps.yml -i local_ansible_conf.ini - args: - chdir: ../ + include_tasks: ../build/1.1._ans_build_demo_apps.yml # mkdir -p scripts/deploy_single_node/test_dir/files # mkdir -p scripts/deploy_single_node/test_dir/apps # cp scripts/deploy_single_node/node_config.yaml scripts/deploy_single_node/test_dir/files -- name: Clear test_dir - shell: rm -rf test_dir +- name: Clear pack + shell: rm -rf pack - name: Mkdirs file: - path: test_dir/{{ item }} + path: pack/test_dir/{{ item }} state: directory loop: - files - apps become: yes -- name: Copy files - copy: - src: ../build/files - dest: test_dir - force: yes +- name: Move files from build to cur dir + shell: mv files pack/test_dir become: yes - name: Copy node_config.yaml copy: src: node_config.yaml - dest: test_dir/files/node_config.yaml + dest: pack/test_dir/files/node_config.yaml force: yes become: yes -- name: Copy Apps +- name: Move apps from build to cur dir + shell: mv apps pack/test_dir + become: yes +- name: Copy bin copy: - src: ../build/apps - dest: test_dir + src: ../../target/release/wasm_serverless + dest: pack force: yes + become: yes +- name: Cat run_node.py + shell: cp ../build/run_node.py pack + become: yes +- name: Permissions + shell: chmod -R 775 pack become: yes \ No newline at end of file diff --git a/scripts/build/ans_build_demo_apps.yml b/scripts/build/ans_build_demo_apps.yml deleted file mode 100644 index e12c242..0000000 --- a/scripts/build/ans_build_demo_apps.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- hosts: localhost - tasks: - - name: Copy wasm - include_tasks: "_ans_build_demo_apps_each.yml" - loop: - - fn2 - - word_count - - longchain - - name: App needed data - shell: python3 _gen_app_need_data.py \ No newline at end of file diff --git a/scripts/build/run_ans_build_demo_apps.sh b/scripts/build/run_ans_build_demo_apps.sh deleted file mode 100644 index 420616b..0000000 --- a/scripts/build/run_ans_build_demo_apps.sh +++ /dev/null @@ -1,2 +0,0 @@ -export LANG=C.UTF-8 -ansible-playbook -vv scripts/build/ans_build_demo_apps.yml -i scripts/local_ansible_conf.ini \ No newline at end of file diff --git a/scripts/build/run_node.py b/scripts/build/run_node.py new file mode 100644 index 0000000..b4603f5 --- /dev/null +++ b/scripts/build/run_node.py @@ -0,0 +1,23 @@ + +# NODE_ID=$1 +# wasm_serverless $NODE_ID test_dir + +import os +import sys + + +CUR_FPATH = os.path.abspath(__file__) +CUR_FDIR = os.path.dirname(CUR_FPATH) +os.chdir(CUR_FDIR) + + +# export RUST_BACKTRACE=1 +os.environ['RUST_BACKTRACE'] = '1' +# export RUST_LOG=info,wasm_serverless=debug +os.environ['RUST_LOG'] = 'info,wasm_serverless=debug' + + +# NODE_ID=$1 +NODE_ID = sys.argv[1] +# wasm_serverless $NODE_ID test_dir +os.system(f'./wasm_serverless {NODE_ID} test_dir') \ No newline at end of file diff --git a/scripts/deploy_cluster/.gitignore b/scripts/deploy_cluster/.gitignore index 3da7440..62d4da6 100644 --- a/scripts/deploy_cluster/.gitignore +++ b/scripts/deploy_cluster/.gitignore @@ -2,4 +2,4 @@ promtail.yaml gen_ansible.ini gen_docker_stack.yml compose_* -/test_dir +/pack \ No newline at end of file diff --git a/scripts/deploy_cluster/_gen_each_node_compose.py b/scripts/deploy_cluster/2.1_gen_each_node_compose.py similarity index 89% rename from scripts/deploy_cluster/_gen_each_node_compose.py rename to scripts/deploy_cluster/2.1_gen_each_node_compose.py index 8ac59d2..7c1ab82 100644 --- a/scripts/deploy_cluster/_gen_each_node_compose.py +++ b/scripts/deploy_cluster/2.1_gen_each_node_compose.py @@ -84,7 +84,15 @@ def promtail_config(lokiaddr): refresh_interval: 5s filters: - name: label - values: ["logging=promtail"] + values: ["log_promtail"] + relabel_configs: + - source_labels: ['__meta_docker_container_name'] + regex: '/(.*)' + target_label: 'container' + - source_labels: ['__meta_docker_container_log_stream'] + target_label: 'logstream' + - source_labels: ['__meta_docker_container_label_logging_jobname'] + target_label: 'job' ''' path=os.path.join(DEPLOY_CLUSTER_DIR, 'promtail.yaml') with open(path, 'w') as f: diff --git a/scripts/deploy_cluster/2.ans_redeploy_cluster.sh b/scripts/deploy_cluster/2.ans_redeploy_cluster.sh new file mode 100644 index 0000000..a8320a3 --- /dev/null +++ b/scripts/deploy_cluster/2.ans_redeploy_cluster.sh @@ -0,0 +1,2 @@ +export LANG=C.UTF-8 +ansible-playbook -vvv scripts/deploy_cluster/2.ans_redeploy_cluster.yml -i scripts/deploy_cluster/gen_ansible.ini \ No newline at end of file diff --git a/scripts/deploy_cluster/ans_redeploy_cluster.yml b/scripts/deploy_cluster/2.ans_redeploy_cluster.yml similarity index 72% rename from scripts/deploy_cluster/ans_redeploy_cluster.yml rename to scripts/deploy_cluster/2.ans_redeploy_cluster.yml index 9a0f70c..3154df5 100644 --- a/scripts/deploy_cluster/ans_redeploy_cluster.yml +++ b/scripts/deploy_cluster/2.ans_redeploy_cluster.yml @@ -2,14 +2,16 @@ - hosts: localhost tasks: - name: Install Build Related - include_tasks: ../install/_ans_install_build.yml + include_tasks: ../install/2._ans_install_build.yml - name: Build sys and demo apps - include_tasks: ../build/_ans_build_sys_with_apps.yml - + include_tasks: ../build/1._ans_build_sys_with_apps.yml - name: Generate Docker Compose File - shell: python3 _gen_each_node_compose.py + shell: python3 2.1_gen_each_node_compose.py + + - name: Move promtail.yaml to pack + shell: mv promtail.yaml pack/ # Preparing for next zip - name: Remove Zip @@ -19,7 +21,7 @@ - name: Zip deploy_pack.zip (docker, scripts) # **/ means any path - command: "zip -r deploy_pack.zip scripts target/release/wasm_serverless -x **/random_words.txt" + command: "zip -r deploy_pack.zip scripts -x **/random_words.txt" args: chdir: ../.. @@ -32,13 +34,6 @@ - name: Debug file path debug: var: src - - name: Make sure the directory exists - ansible.builtin.file: - path: "{{ item }}" - state: directory - become: yes - loop: - - /root/wasm_serverless_deploy - name: Stop & Remove container block: @@ -51,63 +46,59 @@ become: yes ignore_errors: yes - - name: Clear the target directory - shell: rm -rf /root/wasm_serverless_deploy/* - become: yes -# - /root/wasm_serverless_deploy/apps -# - /root/wasm_serverless_deploy/files - - name: Copy deploy_pack.zip to all nodes - copy: - src: ../../deploy_pack.zip - dest: /root/wasm_serverless_deploy/deploy_pack.zip - become: yes - - name: Copy docker-compose.yml to all nodes - copy: - src: compose_{{ ansible_host }}.yml - dest: /root/wasm_serverless_deploy/docker-compose.yml - become: yes - - - name: Unzip deploy_pack.zip - unarchive: - src: /root/wasm_serverless_deploy/deploy_pack.zip - dest: /root/wasm_serverless_deploy - remote_src: yes - become: yes - - - name: Copy big files - copy: - src: test_dir/files/random_words.txt - dest: /root/wasm_serverless_deploy/random_words.txt - become: yes - - name: Install Basic - shell: bash /root/wasm_serverless_deploy/scripts/install/install_python_and_ansible.sh + - name: Prepare remote files + block: + - name: Make sure the directory exists + ansible.builtin.file: + path: "{{ item }}" + state: directory + become: yes + loop: + - /root/wasm_serverless_deploy + - name: Clear the target directory + shell: rm -rf /root/wasm_serverless_deploy/* + become: yes + - name: Copy deploy_pack.zip to all nodes + copy: + src: ../../deploy_pack.zip + dest: /root/wasm_serverless_deploy/deploy_pack.zip + become: yes + - name: Copy docker-compose.yml to all nodes + copy: + src: compose_{{ ansible_host }}.yml + dest: /root/wasm_serverless_deploy/docker-compose.yml + become: yes + - name: Unzip deploy_pack.zip + unarchive: + src: /root/wasm_serverless_deploy/deploy_pack.zip + dest: /root/wasm_serverless_deploy + remote_src: yes + become: yes + - name: Remove zip + file: + path: /root/wasm_serverless_deploy/deploy_pack.zip + state: absent + become: yes + - name: Move built pack to root + shell: mv /root/wasm_serverless_deploy/scripts/deploy_cluster/pack/* /root/wasm_serverless_deploy/ + become: yes + - name: Copy big files + copy: + src: pack/test_dir/files/random_words.txt + dest: /root/wasm_serverless_deploy/test_dir/files/random_words.txt + become: yes + - name: Permission dir + shell: chmod -R 775 /root/wasm_serverless_deploy + become: yes + - name: Debug deploy dir + shell: tree /root/wasm_serverless_deploy - - name: Remove zip - file: - path: /root/wasm_serverless_deploy/deploy_pack.zip - state: absent - become: yes - - name: Move test_dir to root - shell: mv /root/wasm_serverless_deploy/scripts/deploy_cluster/test_dir /root/wasm_serverless_deploy/ - become: yes - - - name: Move promtail.yaml to root - shell: mv /root/wasm_serverless_deploy/scripts/deploy_cluster/promtail.yaml /root/wasm_serverless_deploy/ - become: yes + - name: Install Basic + shell: bash /root/wasm_serverless_deploy/scripts/install/1.install_basic.sh - - name: Move bin to test_dir - shell: mv /root/wasm_serverless_deploy/target/release/wasm_serverless /root/wasm_serverless_deploy/ - become: yes - - - name: Permission dir - shell: chmod -R 775 /root/wasm_serverless_deploy - become: yes - - name: Debug deploy dir - shell: tree /root/wasm_serverless_deploy - - name: Docker Stuff block: - name: Install docker @@ -142,7 +133,6 @@ chdir: /root/wasm_serverless_deploy become: yes - - name: Docker compose up command: docker-compose --compatibility up -d args: diff --git a/scripts/deploy_cluster/2.run_ans_redeploy_cluster.sh b/scripts/deploy_cluster/2.run_ans_redeploy_cluster.sh deleted file mode 100644 index 16b81df..0000000 --- a/scripts/deploy_cluster/2.run_ans_redeploy_cluster.sh +++ /dev/null @@ -1,2 +0,0 @@ -export LANG=C.UTF-8 -ansible-playbook -vvv scripts/deploy_cluster/ans_redeploy_cluster.yml -i scripts/deploy_cluster/gen_ansible.ini \ No newline at end of file diff --git a/scripts/deploy_single_node/.gitignore b/scripts/deploy_single_node/.gitignore index 4317866..ff05100 100644 --- a/scripts/deploy_single_node/.gitignore +++ b/scripts/deploy_single_node/.gitignore @@ -1 +1 @@ -test_dir \ No newline at end of file +pack/ \ No newline at end of file diff --git a/scripts/deploy_single_node/1.ans_build.sh b/scripts/deploy_single_node/1.ans_build.sh new file mode 100644 index 0000000..5e45502 --- /dev/null +++ b/scripts/deploy_single_node/1.ans_build.sh @@ -0,0 +1,3 @@ +export LANG=C.UTF-8 +source $HOME/.cargo/env +ansible-playbook -vv scripts/deploy_single_node/1.ans_build.yml -i scripts/local_ansible_conf.ini \ No newline at end of file diff --git a/scripts/deploy_single_node/1.ans_build.yml b/scripts/deploy_single_node/1.ans_build.yml new file mode 100644 index 0000000..e8ae26d --- /dev/null +++ b/scripts/deploy_single_node/1.ans_build.yml @@ -0,0 +1,32 @@ +--- +- hosts: localhost + tasks: + # - name: Build the application on the master node + # become: yes + # shell: | + # cat > /tmp/compile.sh <<'END' + # #!/bin/bash + + # echo $PATH + # export PATH="/root/.cargo/bin/:$PATH" + # export PATH="/root/.wasmedge/bin/:$PATH" + # cargo build --release + # END + + # bash /tmp/compile.sh + # rm -f /tmp/compile.sh + # mkdir -p scripts/deploy_single_node/test_dir/files + # mkdir -p scripts/deploy_single_node/test_dir/apps + # cp scripts/deploy_single_node/node_config.yaml scripts/deploy_single_node/test_dir/files + - name: Clear pack + shell: rm -rf pack + - name: Install Build Related + include_tasks: ../install/2._ans_install_build.yml + - name: Build sys and demo apps + include_tasks: ../build/1._ans_build_sys_with_apps.yml + - name: Copy node_config.yaml + copy: + src: node_config.yaml + dest: pack/test_dir/files/node_config.yaml + force: yes + become: yes \ No newline at end of file diff --git a/scripts/deploy_single_node/ans_build.yml b/scripts/deploy_single_node/ans_build.yml deleted file mode 100644 index 1cb0b2e..0000000 --- a/scripts/deploy_single_node/ans_build.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -- hosts: localhost - tasks: - - name: Build the application on the master node - become: yes - shell: | - cat > /tmp/compile.sh <<'END' - #!/bin/bash - - echo $PATH - export PATH="/root/.cargo/bin/:$PATH" - export PATH="/root/.wasmedge/bin/:$PATH" - cargo build --release - END - - bash /tmp/compile.sh - rm -f /tmp/compile.sh - - name: Run build ansible script - shell: ansible-playbook -vvv build/ans_build_demo_apps.yml -i local_ansible_conf.ini - args: - chdir: ../ - # mkdir -p scripts/deploy_single_node/test_dir/files - # mkdir -p scripts/deploy_single_node/test_dir/apps - # cp scripts/deploy_single_node/node_config.yaml scripts/deploy_single_node/test_dir/files - - name: Clear test_dir - shell: rm -rf test_dir - - name: Mkdirs - file: - path: test_dir/{{ item }} - state: directory - loop: - - files - - apps - become: yes - - name: Copy files - copy: - src: ../build/files - dest: test_dir - force: yes - become: yes - - name: Copy node_config.yaml - copy: - src: node_config.yaml - dest: test_dir/files/node_config.yaml - force: yes - become: yes - - name: Copy Apps - copy: - src: ../build/apps - dest: test_dir - force: yes - become: yes \ No newline at end of file diff --git a/scripts/deploy_single_node/node_config.yaml b/scripts/deploy_single_node/node_config.yaml index e773ab0..78aef3a 100644 --- a/scripts/deploy_single_node/node_config.yaml +++ b/scripts/deploy_single_node/node_config.yaml @@ -1,7 +1,7 @@ nodes: 1: - addr: 127.0.0.1:2500 + addr: 127.0.0.1:2600 spec: [meta,master] 2: - addr: 127.0.0.1:2505 + addr: 127.0.0.1:2605 spec: [meta,worker] diff --git a/scripts/deploy_single_node/run_ans_build.sh b/scripts/deploy_single_node/run_ans_build.sh deleted file mode 100644 index 0c4d0bd..0000000 --- a/scripts/deploy_single_node/run_ans_build.sh +++ /dev/null @@ -1,3 +0,0 @@ -export LANG=C.UTF-8 -source $HOME/.cargo/env -ansible-playbook -vv scripts/deploy_single_node/ans_build.yml -i scripts/local_ansible_conf.ini \ No newline at end of file diff --git a/scripts/deploy_single_node/run_node.sh b/scripts/deploy_single_node/run_node.sh deleted file mode 100644 index 80f39ee..0000000 --- a/scripts/deploy_single_node/run_node.sh +++ /dev/null @@ -1,8 +0,0 @@ -# cargo build --release -# get command arg -# 1: node_id -export LANG=C.UTF-8 -export RUST_BACKTRACE=1 -export RUST_LOG=info,wasm_serverless=debug -NODE_ID=$1 -target/release/wasm_serverless $NODE_ID scripts/deploy_single_node/test_dir \ No newline at end of file diff --git a/scripts/deploy_single_node/test_dir/files/node_config.yaml b/scripts/deploy_single_node/test_dir/files/node_config.yaml deleted file mode 100644 index e773ab0..0000000 --- a/scripts/deploy_single_node/test_dir/files/node_config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -nodes: - 1: - addr: 127.0.0.1:2500 - spec: [meta,master] - 2: - addr: 127.0.0.1:2505 - spec: [meta,worker] diff --git a/scripts/docker/Waverless/wasm_serverless_entrypoint.sh b/scripts/docker/Waverless/wasm_serverless_entrypoint.sh index b4cabfb..99b8146 100644 --- a/scripts/docker/Waverless/wasm_serverless_entrypoint.sh +++ b/scripts/docker/Waverless/wasm_serverless_entrypoint.sh @@ -9,11 +9,6 @@ echo "Who am i: $(whoami)" timeout 10 ping baidu.com -cd /usr/local/bin/ -echo "ls /etc/wasm_serverless/" -ls /etc/wasm_serverless/ -echo "ls /etc/wasm_serverless/files" -ls /etc/wasm_serverless/files /etc/wasm_serverless/wasm_serverless $WASM_SERVERLESS_NODEID /etc/wasm_serverless/test_dir \ No newline at end of file diff --git a/scripts/install/install_python_and_ansible.sh b/scripts/install/1.install_basic.sh similarity index 94% rename from scripts/install/install_python_and_ansible.sh rename to scripts/install/1.install_basic.sh index bab5d6f..20d6447 100644 --- a/scripts/install/install_python_and_ansible.sh +++ b/scripts/install/1.install_basic.sh @@ -51,6 +51,16 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi +# - clang +# - lldb +# - lld +# - build-essential +# - curl +# - protobuf-compiler +# - pkg-config +# - libssl-dev +# - snap + # 调用函数,将要检查的命令和对应的包名称传递给函数 install_command "python3" "python3" install_command "pip3" "python3-pip" diff --git a/scripts/install/_ans_install_wasmedge.yml b/scripts/install/2.1_ans_install_wasmedge.yml similarity index 100% rename from scripts/install/_ans_install_wasmedge.yml rename to scripts/install/2.1_ans_install_wasmedge.yml diff --git a/scripts/install/_ans_install_build.yml b/scripts/install/2._ans_install_build.yml similarity index 91% rename from scripts/install/_ans_install_build.yml rename to scripts/install/2._ans_install_build.yml index 8dd8cf2..c405973 100644 --- a/scripts/install/_ans_install_build.yml +++ b/scripts/install/2._ans_install_build.yml @@ -16,7 +16,7 @@ - name: Install Docker become: true - shell: bash ../install/install_docker.sh + shell: bash ../install/3.install_docker.sh - name: Check if Rust is installed become: true @@ -47,4 +47,4 @@ when: "'rustc' not in rust_installed.stdout" - name: Install WasmEdge - include_tasks: _ans_install_wasmedge.yml + include_tasks: 2.1_ans_install_wasmedge.yml diff --git a/scripts/install/2.ans_install_build.sh b/scripts/install/2.ans_install_build.sh new file mode 100644 index 0000000..0bf3312 --- /dev/null +++ b/scripts/install/2.ans_install_build.sh @@ -0,0 +1,2 @@ +export LANG=C.UTF-8 +ansible-playbook -vv scripts/install/2.ans_install_build.yml -i scripts/local_ansible_conf.ini diff --git a/scripts/install/ans_install_build.yml b/scripts/install/2.ans_install_build.yml similarity index 72% rename from scripts/install/ans_install_build.yml rename to scripts/install/2.ans_install_build.yml index a6ef90c..0152b06 100644 --- a/scripts/install/ans_install_build.yml +++ b/scripts/install/2.ans_install_build.yml @@ -3,4 +3,4 @@ tasks: # install rysr, proto, docker, docker-compose - name: Install Build Related - include_tasks: _ans_install_build.yml \ No newline at end of file + include_tasks: 2._ans_install_build.yml \ No newline at end of file diff --git a/scripts/install/install_docker.sh b/scripts/install/3.install_docker.sh similarity index 100% rename from scripts/install/install_docker.sh rename to scripts/install/3.install_docker.sh diff --git a/scripts/install/run_ans_install_build.sh b/scripts/install/run_ans_install_build.sh deleted file mode 100644 index bee9dd3..0000000 --- a/scripts/install/run_ans_install_build.sh +++ /dev/null @@ -1,2 +0,0 @@ -export LANG=C.UTF-8 -ansible-playbook -vv scripts/install/ans_install_build.yml -i scripts/local_ansible_conf.ini