This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:jammy | |
| # Install base dependencies | |
| RUN apt-get update \ | |
| && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
| curl gnupg jq ca-certificates vim logrotate \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Add casper apt repo | |
| RUN mkdir -p /etc/apt/keyrings \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": 123, | |
| "jsonrpc": "2.0", | |
| "method": "state_get_package", | |
| "params": [ | |
| { | |
| "ContractPackageHash": "contract-package-d0c958a99da8c3e05f1e1c1ad592268280f548984d9916e4a6dd17ce0b4d289f" | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| note: | |
| 1, start casper vpn on the instance. | |
| 2, create ssh key and ansible vault on the instance. Just use the file Aji sent | |
| 3, | |
| eval `ssh-agent -s` | |
| ssh-add ~/.ssh/stest_ed25519 | |
| ssh-add ~/.ssh/cladmin_id_ed25519 | |
| =========== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| validator: | |
| casper-client account-address -p 0141247b3eb4244918d14d3d6df84e01e7a46f90287739ac6e131b4f9fb3677f34 | |
| account-hash-5f1474b650fdb71f0330a7ae62892d6446a189690c1e5389a282ab5cdc7e2dca | |
| delegator: | |
| casper-client account-address -p 014df7e27747b916ad006b2e7acf750536d080e92a7aeef4062db8724b3d2b422d | |
| account-hash-4189ab5bf61318e0ce147f0207fd5b35031f31ce55e31675602ca76bd4df4121 | |
| bid-addr-025f1474b650fdb71f0330a7ae62892d6446a189690c1e5389a282ab5cdc7e2dca4189ab5bf61318e0ce147f0207fd5b35031f31ce55e31675602ca76bd4df4121 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while true | |
| do | |
| STATUS="$(systemctl is-active casper-node-launcher.service)" | |
| if [ "${STATUS}" = "active" ]; then | |
| # send logs | |
| sudo logrotate -f /etc/logrotate.d/casper-node | |
| curl -sSf https://cnm.casperlabs.io/debug_upload_script | bash > done.txt | |
| break | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "editor.fontSize": 18, | |
| "workbench.editor.enablePreview": false, | |
| "explorer.confirmDelete": false, | |
| "security.workspace.trust.untrustedFiles": "open", | |
| "workbench.editor.labelFormat": "short", | |
| "explorer.confirmDragAndDrop": false, | |
| "editor.defaultFormatter": "matklad.rust-analyzer", | |
| "editor.formatOnSave": true, | |
| "editor.formatOnType": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| download ansible-2.9.27.tar.gz | |
| python3 -m pip install --user ansible-2.9.27.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh -L 9999:localhost:3000 -L 4000:localhost:4000 jiuhong2.hk | |
| on jiuhong2.hk, the website is running on localhost:3000 and | |
| middleware running on localhost:4000 | |
| then use the above command I am able to browse the website on local computer: | |
| http://localhost:9999/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: "compare - v{{index}}/*" | |
| ansible.builtin.shell: | | |
| diff "check_tempworkspace/{{ item.path.split('/')[1:] | join('/') }}" "tempworkspace/{{ item.path.split('/')[1:] | join('/') }}" | |
| loop: "{{ name.files }}" | |
| loop_control: | |
| label: 'hihihi' | |
| failed_when: "diff_output.rc > 0" | |
| register: diff_output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Send config to server1 | |
| gather_facts: false | |
| hosts: localhost | |
| # become: true | |
| tasks: | |
| - name: List folders under tempworkspace | |
| ansible.builtin.find: | |
| paths: tempworkspace |