From e7fc482b27094268b89783f98e6ee043a2a7e715 Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Wed, 27 Mar 2024 11:10:40 +0800 Subject: [PATCH] chore: update docker-compose, fix openssl deps in worker --- Cargo.lock | 200 +++++++++++++------------------- Cargo.toml | 2 +- crates/worker-server/Cargo.toml | 4 +- deploy/.env | 3 +- deploy/docker-compose.yaml | 4 +- land-server.Dockerfile | 2 +- land-worker.Dockerfile | 2 +- 7 files changed, 93 insertions(+), 124 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5e7d0ab2..fa7b68f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1006,7 +1006,7 @@ dependencies = [ "itertools", "log", "smallvec", - "wasmparser", + "wasmparser 0.201.0", "wasmtime-types", ] @@ -1355,21 +1355,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1899,22 +1884,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper 1.2.0", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - [[package]] name = "hyper-util" version = "0.1.3" @@ -2280,7 +2249,7 @@ dependencies = [ "which", "wit-bindgen-core", "wit-bindgen-rust", - "wit-component", + "wit-component 0.202.0", ] [[package]] @@ -2533,7 +2502,6 @@ dependencies = [ "base64 0.22.0", "http-body-util", "hyper 1.2.0", - "hyper-tls", "hyper-util", "indexmap", "ipnet", @@ -2624,24 +2592,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "newline-converter" version = "0.3.0" @@ -2807,50 +2757,12 @@ dependencies = [ "uuid", ] -[[package]] -name = "openssl" -version = "0.10.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" -dependencies = [ - "bitflags 2.5.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.55", -] - [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-sys" -version = "0.9.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "ordered-float" version = "3.9.2" @@ -4840,16 +4752,6 @@ dependencies = [ "syn 2.0.55", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.24.1" @@ -5351,7 +5253,23 @@ dependencies = [ "serde_json", "spdx", "wasm-encoder 0.201.0", - "wasmparser", + "wasmparser 0.201.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "094aea3cb90e09f16ee25a4c0e324b3e8c934e7fd838bfa039aef5352f44a917" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", ] [[package]] @@ -5378,6 +5296,17 @@ dependencies = [ "semver", ] +[[package]] +name = "wasmparser" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6998515d3cf3f8b980ef7c11b29a9b1017d4cf86b99ae93b546992df9931413" +dependencies = [ + "bitflags 2.5.0", + "indexmap", + "semver", +] + [[package]] name = "wasmprinter" version = "0.201.0" @@ -5385,7 +5314,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a67e66da702706ba08729a78e3c0079085f6bfcb1a62e4799e97bbf728c2c265" dependencies = [ "anyhow", - "wasmparser", + "wasmparser 0.201.0", ] [[package]] @@ -5418,7 +5347,7 @@ dependencies = [ "serde_json", "target-lexicon", "wasm-encoder 0.201.0", - "wasmparser", + "wasmparser 0.201.0", "wasmtime-cache", "wasmtime-component-macro", "wasmtime-component-util", @@ -5475,7 +5404,7 @@ dependencies = [ "syn 2.0.55", "wasmtime-component-util", "wasmtime-wit-bindgen", - "wit-parser", + "wit-parser 0.201.0", ] [[package]] @@ -5503,7 +5432,7 @@ dependencies = [ "object", "target-lexicon", "thiserror", - "wasmparser", + "wasmparser 0.201.0", "wasmtime-cranelift-shared", "wasmtime-environ", "wasmtime-versioned-export-macros", @@ -5545,7 +5474,7 @@ dependencies = [ "target-lexicon", "thiserror", "wasm-encoder 0.201.0", - "wasmparser", + "wasmparser 0.201.0", "wasmprinter", "wasmtime-component-util", "wasmtime-types", @@ -5635,7 +5564,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "wasmparser", + "wasmparser 0.201.0", ] [[package]] @@ -5691,7 +5620,7 @@ dependencies = [ "gimli", "object", "target-lexicon", - "wasmparser", + "wasmparser 0.201.0", "wasmtime-cranelift-shared", "wasmtime-environ", "winch-codegen", @@ -5706,7 +5635,7 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wit-parser", + "wit-parser 0.201.0", ] [[package]] @@ -5878,7 +5807,7 @@ dependencies = [ "regalloc2", "smallvec", "target-lexicon", - "wasmparser", + "wasmparser 0.201.0", "wasmtime-environ", ] @@ -6094,7 +6023,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e85e72719ffbccf279359ad071497e47eb0675fe22106dea4ed2d8a7fcb60ba4" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.201.0", ] [[package]] @@ -6112,9 +6041,9 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", + "wasm-metadata 0.201.0", "wit-bindgen-core", - "wit-component", + "wit-component 0.201.0", ] [[package]] @@ -6145,9 +6074,28 @@ dependencies = [ "serde_derive", "serde_json", "wasm-encoder 0.201.0", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-metadata 0.201.0", + "wasmparser 0.201.0", + "wit-parser 0.201.0", +] + +[[package]] +name = "wit-component" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c836b1fd9932de0431c1758d8be08212071b6bba0151f7bac826dbc4312a2a9" +dependencies = [ + "anyhow", + "bitflags 2.5.0", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", ] [[package]] @@ -6165,7 +6113,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.201.0", +] + +[[package]] +name = "wit-parser" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744237b488352f4f27bca05a10acb79474415951c450e52ebd0da784c1df2bcc" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.202.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f23ad182..cf629705 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,5 +79,5 @@ uuid = { version = "1.8.0", features = ["v4"] } wit-bindgen = "0.22.0" wit-bindgen-core = "0.22.0" wit-bindgen-rust = "0.22.0" -wit-component = "0.201.0" +wit-component = "0.202.0" url = "2.5.0" diff --git a/crates/worker-server/Cargo.toml b/crates/worker-server/Cargo.toml index 560a1334..ffce62f6 100644 --- a/crates/worker-server/Cargo.toml +++ b/crates/worker-server/Cargo.toml @@ -10,7 +10,9 @@ axum = { workspace = true } hostname = "0.3.1" land-worker-impl = { workspace = true } metrics = "0.22.3" -metrics-exporter-prometheus = "0.14.0" +metrics-exporter-prometheus = { version = "0.14.0", default-features = false, features = [ + "http-listener" +] } once_cell = { workspace = true } serde = { workspace = true } tokio = { workspace = true } diff --git a/deploy/.env b/deploy/.env index eec608e0..7e7ed01b 100644 --- a/deploy/.env +++ b/deploy/.env @@ -1 +1,2 @@ -LAND_SERVER_TOKEN=aabbccdd \ No newline at end of file +LAND_SERVER_TOKEN=aabbccdd +LAND_DATA_DIR=/data/runtime-land diff --git a/deploy/docker-compose.yaml b/deploy/docker-compose.yaml index c0a0e89f..97ba5aba 100644 --- a/deploy/docker-compose.yaml +++ b/deploy/docker-compose.yaml @@ -17,7 +17,7 @@ services: - runtime_land_network volumes: - /var/run/docker.sock:/var/run/docker.sock - - /data/runtime-land:/data/runtime-land + - ${LAND_DATA_DIR}:/data/runtime-land worker: platform: linux/amd64 image: ghcr.io/fuxiaohei/runtime-land-worker:develop @@ -32,7 +32,7 @@ services: networks: - runtime_land_network volumes: - - /data/runtime-land:/data/runtime-land + - ${LAND_DATA_DIR}:/data/runtime-land labels: - traefik.enable=true - traefik.http.services.land-worker.loadbalancer.server.port=8866 diff --git a/land-server.Dockerfile b/land-server.Dockerfile index b8e538c4..7f6f33f9 100644 --- a/land-server.Dockerfile +++ b/land-server.Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.76.0 as build +FROM rust:1.77 as build WORKDIR /usr/src/land-server COPY . . diff --git a/land-worker.Dockerfile b/land-worker.Dockerfile index e53f3fd7..3daa3ccc 100644 --- a/land-worker.Dockerfile +++ b/land-worker.Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.76.0 as build +FROM rust:1.77 as build WORKDIR /usr/src/land-src COPY . .