@cryptotaxi247 / netdata-1 / commits / 8068c952d

Add instructions for reconnecting a Docker node to another Space (#14714)

* add reconnecting instructions for Docker * add yml notice * Update claim/README.md Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud> --------- Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>

Fotis Voutsas committed Mar 13, 2023 at 18:21 UTC 8068c952d8e1812caf348b77f38ae3df1014cc65
1 file changed +52
claim/README.md
+52
@@ -484,6 +484,8 @@ with details about your system and relevant output from `error.log`.
484
485 ### Remove and reconnect a node
486
487 +#### Linux based installations
488 +
489 To remove a node from your Space in Netdata Cloud, delete the `cloud.d/` directory in your Netdata library directory.
490
491 ```bash
@@ -495,12 +497,62 @@ This node no longer has access to the credentials it was used when connecting to
497 You will still be able to see this node in your War Rooms in an **unreachable** state.
498
499 If you want to reconnect this node, you need to:
500 +
501 1. Ensure that the `/var/lib/netdata/cloud.d` directory doesn't exist. In some installations, the path is `/opt/netdata/var/lib/netdata/cloud.d`.
502 2. Stop the agent.
503 3. Ensure that the `uuidgen-runtime` package is installed. Run ```echo "$(uuidgen)"``` and validate you get back a UUID.
504 4. Copy the kickstart.sh command to add a node from your space and add to the end of it `--claim-id "$(uuidgen)"`. Run the command and look for the message `Node was successfully claimed.`
505 5. Start the agent
506
507 +#### Docker based installations
508 +
509 +To remove a node from you Space in Netdata Cloud, and connect it to another Space, follow these steps:
510 +
511 +1. Enter the running container you wish to remove from your Space
512 +
513 + ```bash
514 + docker exec -it CONTAINER_NAME sh
515 + ```
516 +
517 + Replacing `CONTAINER_NAME` with either the container's name or ID.
518 +
519 +2. Delete `/var/lib/netdata/cloud.d` and `/var/lib/netdata/registry/netdata.public.unique.id`
520 +
521 + ```bash
522 + rm -rf /var/lib/netdata/cloud.d/
523 +
524 + rm /var/lib/netdata/registry/netdata.public.unique.id
525 + ```
526 +
527 +3. Stop and remove the container
528 +
529 + **Docker CLI:**
530 +
531 + ```bash
532 + docker stop CONTAINER_NAME
533 +
534 + docker rm CONTAINER_NAME
535 + ```
536 +
537 + Replacing `CONTAINER_NAME` with either the container's name or ID.
538 +
539 + **Docker Compose:**
540 + Inside the directory that has the `docker-compose.yml` file, run:
541 +
542 + ```bash
543 + docker compose down
544 + ```
545 +
546 + **Docker Swarm:**
547 + Run the following, and replace `STACK` with your Stack's name:
548 +
549 + ```bash
550 + docker stack rm STACK
551 + ```
552 +
553 +4. Finally, go to your new Space, copy the install command with the new claim token and run it.
554 + If you are using a `docker-compose.yml` file, you will have to overwrite it with the new claiming token.
555 + The node should now appear online in that Space.
556
557 ## Connecting reference
558 In the sections below, you can find reference material for the kickstart script, claiming script, connecting via the Agent's command line