diff --git a/.basic_services b/.basic_services index 6d97490..1885c4a 100644 --- a/.basic_services +++ b/.basic_services @@ -1,4 +1,3 @@ # Services start/stop order # Will start from top to bottom and stop in reverse -nats storage diff --git a/.env b/.env index 48faaa0..a53481e 100644 --- a/.env +++ b/.env @@ -21,10 +21,6 @@ IR_IMAGE=nspccdev/neofs-ir NODE_VERSION=0.39.1 NODE_IMAGE=nspccdev/neofs-storage -# NATS Server -NATS_VERSION=2.7.2 -NATS_IMAGE=nats - # HTTP Gate HTTP_GW_VERSION=0.27.5 HTTP_GW_IMAGE=nspccdev/neofs-http-gw diff --git a/.gitignore b/.gitignore index e563f13..7a90abe 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,6 @@ sites/* # Runtime generation keys services/storage/*tls.crt services/storage/*tls.key -services/nats/*.pem services/k6_node/id_ed25519* # IR NeoFS contract configuration diff --git a/Makefile b/Makefile index e918e75..448fdae 100644 --- a/Makefile +++ b/Makefile @@ -214,7 +214,7 @@ hosts: vendor/hosts .PHONY: clean .ONESHELL: clean: - @rm -rf vendor/* services/storage/s04tls.* services/nats/*.pem services/k6_node/id_ed25519* + @rm -rf vendor/* services/storage/s04tls.* services/k6_node/id_ed25519* @> .int_test.env @for svc in $(PULL_SVCS) do diff --git a/bin/tests/update_hosts_test.sh b/bin/tests/update_hosts_test.sh index c81ec22..c77551e 100755 --- a/bin/tests/update_hosts_test.sh +++ b/bin/tests/update_hosts_test.sh @@ -101,7 +101,6 @@ update_entries_in_hosts_test() { 192.168.100.53 coredns.neofs.devenv 192.168.100.81 http.neofs.devenv 192.168.100.102 k6_node.neofs.devenv -192.168.100.101 nats.neofs.devenv 192.168.100.83 rest.neofs.devenv 192.168.100.82 s3.neofs.devenv 192.168.100.82 *.s3.neofs.devenv @@ -119,7 +118,6 @@ echo "127.0.0.1 localhost 192.168.130.53 coredns.neofs.devenv 192.168.130.81 http.neofs.devenv 192.168.130.61 ir01.neofs.devenv -192.168.130.101 nats.neofs.devenv 192.168.130.83 rest.neofs.devenv 192.168.130.82 s3.neofs.devenv 192.168.130.82 *.s3.neofs.devenv @@ -134,7 +132,6 @@ echo "127.0.0.1 localhost 192.168.100.53 coredns.neofs.devenv 192.168.100.81 http.neofs.devenv 192.168.100.61 ir01.neofs.devenv -192.168.100.101 nats.neofs.devenv 192.168.100.83 rest.neofs.devenv 192.168.100.82 s3.neofs.devenv 192.168.100.82 *.s3.neofs.devenv diff --git a/services/nats/.env b/services/nats/.env deleted file mode 120000 index c7360fb..0000000 --- a/services/nats/.env +++ /dev/null @@ -1 +0,0 @@ -../../.env \ No newline at end of file diff --git a/services/nats/.hosts b/services/nats/.hosts deleted file mode 100644 index 6ed5417..0000000 --- a/services/nats/.hosts +++ /dev/null @@ -1 +0,0 @@ -IPV4_PREFIX.101 nats.LOCAL_DOMAIN diff --git a/services/nats/.int_test.env b/services/nats/.int_test.env deleted file mode 120000 index 582b6a2..0000000 --- a/services/nats/.int_test.env +++ /dev/null @@ -1 +0,0 @@ -../../.int_test.env \ No newline at end of file diff --git a/services/nats/artifacts.mk b/services/nats/artifacts.mk deleted file mode 100644 index b66cebf..0000000 --- a/services/nats/artifacts.mk +++ /dev/null @@ -1,7 +0,0 @@ -# Create new TLS certs for NATS server and clients - -NATS_DIR=$(abspath services/nats) - -get.nats: - @echo "⇒ Creating certs for NATS server and clients" - ${NATS_DIR}/generate_cert.sh ${LOCAL_DOMAIN} > /dev/null diff --git a/services/nats/docker-compose.yml b/services/nats/docker-compose.yml deleted file mode 100644 index d69d10d..0000000 --- a/services/nats/docker-compose.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- - -version: "2.4" -services: - nats: - image: ${NATS_IMAGE}:${NATS_VERSION} - domainname: ${LOCAL_DOMAIN} - hostname: nats - container_name: nats - restart: on-failure - dns: - - ${IPV4_PREFIX}.101 - networks: - nats_int: - internet: - ipv4_address: ${IPV4_PREFIX}.101 - volumes: - - ./../../vendor/hosts:/etc/hosts - - ./nats.conf:/etc/nats/neofs-nats-server.conf - - ./server-cert.pem:/certs/server-cert.pem - - ./server-key.pem:/certs/server-key.pem - - ./ca-cert.pem:/certs/ca-cert.pem - stop_signal: SIGKILL - env_file: [ ".env", ".int_test.env" ] - command: ["-c", "/etc/nats/neofs-nats-server.conf"] - -networks: - nats_int: - internet: - external: true - name: basenet_internet diff --git a/services/nats/generate_cert.sh b/services/nats/generate_cert.sh deleted file mode 100755 index 071f9df..0000000 --- a/services/nats/generate_cert.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -source bin/helper.sh - -WORKDIR=$(dirname "$0") -LOCAL_DOMAIN=$1 - -CA_KEY=$WORKDIR/ca-key.pem -CA_CRT=$WORKDIR/ca-cert.pem - -SRV_KEY=$WORKDIR/server-key.pem -SRV_REQ=$WORKDIR/server-req.csr -SRV_CRT=$WORKDIR/server-cert.pem - -CLI_KEY=$WORKDIR/client-key.pem -CLI_REQ=$WORKDIR/client-req.csr -CLI_CRT=$WORKDIR/client-cert.pem - -SUBJ="/O=NSPCC" - -if [[ ! -f $CA_KEY || ! -f $CA_CRT ]]; then - openssl req -newkey rsa:4096 -x509 -days 365 -nodes -keyout $CA_KEY -out $CA_CRT -subj $SUBJ 2>&1 || - die "CA certificate was not created" -fi - -if [[ ! -f $SRV_KEY || ! -f $SRV_CRT ]]; then - openssl req -newkey rsa:4096 -nodes -keyout $SRV_KEY -out $SRV_REQ -subj $SUBJ 2>&1 || - die "Server certificate was not created" - - openssl x509 -req -days 365 -set_serial 01 -in $SRV_REQ -out $SRV_CRT -CA $CA_CRT -CAkey $CA_KEY \ - -extensions san -extfile <(printf "[san]\nsubjectAltName=DNS:nats.$LOCAL_DOMAIN") 2>&1 || { - rm $SRV_REQ - die "Server certificate was not signed by CA" - } - - rm $SRV_REQ -fi - -if [[ ! -f $CLI_KEY || ! -f $CLI_CRT ]]; then - openssl req -newkey rsa:4096 -nodes -keyout $CLI_KEY -out $CLI_REQ -subj $SUBJ 2>&1 || - die "Client certificate was not created" - - openssl x509 -req -days 365 -set_serial 01 -in $CLI_REQ -out $CLI_CRT -CA $CA_CRT -CAkey $CA_KEY 2>&1 || { - rm $CLI_REQ - die "Client certificate was not signed by CA" - } - - rm $CLI_REQ -fi diff --git a/services/nats/nats.conf b/services/nats/nats.conf deleted file mode 100644 index 0c7af0a..0000000 --- a/services/nats/nats.conf +++ /dev/null @@ -1,15 +0,0 @@ -port: 4222 -monitor_port: 8222 - -jetstream { - store_dir=nats - max_memory_store: 1GB - max_file_store: 2GB -} - -tls { - cert_file: /certs/server-cert.pem - key_file: /certs/server-key.pem - ca_file: /certs/ca-cert.pem - verify: true -} diff --git a/services/storage/cfg/config.yml b/services/storage/cfg/config.yml index 73436b8..41c7730 100644 --- a/services/storage/cfg/config.yml +++ b/services/storage/cfg/config.yml @@ -20,17 +20,6 @@ morph: endpoints: # Side chain NEO RPC endpoints - ws://ir01.neofs.devenv:30333/ws -# Common storage node settings -node: - notification: - enabled: true # Turn on object notification service - endpoint: "tls://nats.neofs.devenv:4222" # Notification server endpoint - timeout: "6s" # Timeout for object notification client connection - default_topic: "test" # Default topic for object notifications if not found in object's meta - certificate: "/etc/neofs-node/nats.tls.cert" # Path to TLS certificate - key: "/etc/neofs-node/nats.tls.key" # Path to TLS key - ca: "/etc/neofs-node/nats.ca.crt" # Path to optional CA certificate - # Tree section tree: enabled: true diff --git a/services/storage/docker-compose.yml b/services/storage/docker-compose.yml index 9ef259d..e42be10 100644 --- a/services/storage/docker-compose.yml +++ b/services/storage/docker-compose.yml @@ -19,9 +19,6 @@ services: - ./../../vendor/neofs-cli:/neofs-cli - ./cli-cfg.yml:/cli-cfg.yml - ./s04tls.crt:/etc/ssl/certs/s04tls.crt - - ../nats/client-cert.pem:/etc/neofs-node/nats.tls.cert - - ../nats/client-key.pem:/etc/neofs-node/nats.tls.key - - ../nats/ca-cert.pem:/etc/neofs-node/nats.ca.crt - ./cfg:/etc/neofs/storage stop_signal: SIGKILL env_file: [ ".env", ".storage.env", ".int_test.env" ] @@ -58,9 +55,6 @@ services: - ./../../vendor/neofs-cli:/neofs-cli - ./cli-cfg.yml:/cli-cfg.yml - ./s04tls.crt:/etc/ssl/certs/s04tls.crt - - ../nats/client-cert.pem:/etc/neofs-node/nats.tls.cert - - ../nats/client-key.pem:/etc/neofs-node/nats.tls.key - - ../nats/ca-cert.pem:/etc/neofs-node/nats.ca.crt - ./cfg:/etc/neofs/storage stop_signal: SIGKILL env_file: [ ".env", ".storage.env", ".int_test.env" ] @@ -97,9 +91,6 @@ services: - ./../../vendor/neofs-cli:/neofs-cli - ./cli-cfg.yml:/cli-cfg.yml - ./s04tls.crt:/etc/ssl/certs/s04tls.crt - - ../nats/client-cert.pem:/etc/neofs-node/nats.tls.cert - - ../nats/client-key.pem:/etc/neofs-node/nats.tls.key - - ../nats/ca-cert.pem:/etc/neofs-node/nats.ca.crt - ./cfg:/etc/neofs/storage stop_signal: SIGKILL env_file: [ ".env", ".storage.env", ".int_test.env" ] @@ -137,9 +128,6 @@ services: - ./cli-cfg.yml:/cli-cfg.yml - ./s04tls.crt:/tls.crt - ./s04tls.key:/tls.key - - ../nats/client-cert.pem:/etc/neofs-node/nats.tls.cert - - ../nats/client-key.pem:/etc/neofs-node/nats.tls.key - - ../nats/ca-cert.pem:/etc/neofs-node/nats.ca.crt - ./cfg:/etc/neofs/storage stop_signal: SIGKILL env_file: [ ".env", ".storage.env", ".int_test.env" ]