wemixarchive / go-wemix

Go implementation of the Wemix project.
https://www.wemix.com/
GNU Lesser General Public License v3.0
28 stars 25 forks source link

add local test scripts #113

Closed paul-ahn-wm closed 3 months ago

paul-ahn-wm commented 4 months ago

Simple Wemix node launching script in a local environment with docker.

Usage:

// with local files
./local-docker-env/local-docker.sh -a <account_num>  -v <ubuntu_version>(optional)

// with remote repository files
./local-docker-env/local-docker-git.sh -a <account_num> -b <branch> -r <repo> -v <ubuntu_version>(optional)
kai-yu-wm commented 4 months ago

How to do it with just a script. Sample :

(cat <<EOF services: ubuntu: image: ubuntu:22.04 hostname: ubuntu tty: true container_name: ubuntu EOF ) | docker compose -f /dev/stdin up -d

jed-wemade commented 4 months ago

Local Dockerfiles use two canonical images: golang:1.19 and ubuntu:latest. Currently, golang:1.19 based on debian image uses glibc 2.36 and ubuntu:latest uses glibc 2.39. Using different glibc library may occurs wrong symbol linking so I suggest specifiying ubuntu version too. Note that supported ubuntu versions wemix doc stated are 22.04 LTS, 20.04.4 and 18.04.6 LTS. (22.04 LTS is used in Dockerfile.wemix)

paul-ahn-wm commented 4 months ago

@kai-yu-wm

How to do it with just a script. Sample :

(cat <<EOF services: ubuntu: image: ubuntu:22.04 hostname: ubuntu tty: true container_name: ubuntu EOF ) | docker compose -f /dev/stdin up -d

Initially, I implemented codes like your suggestion to print the output, but I removed it because it made reviewing the terminal log difficult.

paul-ahn-wm commented 4 months ago

@jed-wemade

Local Dockerfiles use two canonical images: golang:1.19 and ubuntu:latest. Currently, golang:1.19 based on debian image uses glibc 2.36 and ubuntu:latest uses glibc 2.39. Using different glibc library may occurs wrong symbol linking so I suggest specifiying ubuntu version too. Note that supported ubuntu versions wemix doc stated are 22.04 LTS, 20.04.4 and 18.04.6 LTS. (22.04 LTS is used in Dockerfile.wemix)

I initially implemented the local test script with the Ubuntu version intentionally set to the latest, as it was developed for testing purposes. However, after considering your suggestion, I thought it would be better to make the Ubuntu version optional. Therefore, I have modified the script to incorporate this improvement.