Building from source and run a Groestlcoin node (cli only) under Ubuntu 22.04 LTS

It was a bit while after the Building from source a Groestlcoin node (cli only) under Ubuntu 16 LTS. So after 6 years is it the same procedure or there are additional or simplified steps (to build) and run a cryptocurrency Groestlcoin node? The GRS price seems the same as it was 6 years ago, but there are some new things in the software.

main menu
groestlcoin-cli getblockchaininfo

The first step is to build the software and it is one of the most important steps – download the source code ONLY from the official source, check the official site https://www.groestlcoin.org/groestlcoin-core-wallet/ where the source code could be downloaded or to see where is the official place for the source code – https://github.com/Groestlcoin/groestlcoin. Check the links yourself! The https://github.com/Groestlcoin/groestlcoin git link will be used to download the latest stable version of the code and to build a Groestlcoin node, which may or may not include wallet capabilities. Building the Groestlcoin core package from the source you’ll have your private and secure Groestlcoin node (and wallet), which could be used to make secure transactions and receive funds in the Groestlcoin network and a lot more! DO IT YOURSELF – the most secure way of generating a Groestlcoin wallet address, making transactions such as sending and receiving coins, and storing your wallets.

STEP 1) Update your system and install dependencies

Update your system and install the needed additional binaries and libraries to build and run the Groestlcoin core package. These dependencies include the ones needed to build the Groestcoin wallet functionality! By default, many Linux systems won’t include dependencies needed to build the wallet.

main menu
sudo apt install groestlcoin dependencies

sudo apt -y update
sudo apt -y upgrade
sudo apt install build-essential libssl-dev libboost-all-dev libtool automake libevent-dev bsdmainutils git make g++ gcc autoconf cpp ngrep iftop sysstat autotools-dev pkg-config libminiupnpc-dev libzmq3-dev libdb-dev libdb5.3++-dev sqlite3 libsqlite3-dev

An additional 722 Mbytes will be occupied.
Keep on reading!

Review of freshly installed Fedora 38 Xfce Desktop

After the tutorial on how to install Fedora 38 Xfce Desktop this tutorial is mainly to see what to expect from a freshly installed Fedora 36 Xfce Desktop – the look and feel of the new Xfce GUI (Xfce version – 4.18). The Fedora 38 Xfce Desktop is part of Fedora spins – https://spins.fedoraproject.org/xfce/
Here you can find out how to install it – Install Fedora 38 Xfce Desktop.
The idea of this article is to see what to expect from Fedora 38 Xfce – the look and feel of the GUI, the default installed programs, and their look and how to do some basic steps with them. Here you’ll find more than 170 screenshots and not so many texts we do not want to turn this review of many texts and version information and 3 meaningless screenshots, which you could not see anything for the user interface because these days it is the primary goal of a Desktop system. You can expect more of this kind of review in the future.
This article is the first part of reviewing the Fedora 36 Xfce Desktop. The second article contains Xfce Settings screenshots that are coming soon.

Xfce is a collection of programs that provides a features-rich desktop environment.

Here are some core elements:

  • Window Manager (xfwm4) – Handles the placement of windows on the screen.
  • Panel (xfce4-panel) – Provides a home for window buttons, launchers, app menu and more.
  • Desktop Manager (xfdesktop) – Sets desktop backgrounds, handles icons and more.
  • File Manager (thunar) – Manages your files in a modern, easy-to-use and fast way.
  • Volume Manager (thunar-volman) – Manages removable drives and media for Thunar.
  • Session Manager (xfce4-session) – Saves and restores your session, handles startup, autostart and shutdown.
  • Setting System (xfce4-settings) – Configures appearance, display, keyboard, and mouse settings.
  • Application Finder (xfce4-appfinder) – Quickly finds and launches applications installed on your system
  • Settings Daemon (xfconf) – Stores your settings in a D-Bus-based configuration system.
  • A Menu Library (garcon) – Implements a freedesktp.org compliant menu based on GLib and GIO.
  • Thumbnails Services (tumbler) – Implements the thumbnails management D-Bus specification.

Fedora 38 Xfce screenshots

SCREENSHOT 1) Fedora (6.2.9-300.fc38.x86_64) 38 (Xfce)

main menu
grub 2 entry boot

Keep on reading!

Install Fedora 38 Xfce Desktop

This article will show the simple steps of installing a modern Linux DistributionFedora 38 Xfce Desktop with Xfce for the graphical user interface – one of the alternatives, which tries to break the domination of GNOME and partly KDE Plasma. First, it is offered the basic steps for installing the Operating system and then there are some screenshots of the installed system and its look and feel. Here is another article available with more screenshots of the installed and working Fedora 38 Xfce DesktopReview of freshly installed Fedora 38 Xfce Desktop.
Xfce offers a fast, easy, and lightweight graphical environment for Linux systems and Fedora teams bring it out-of-the-box with their spins projects – Fedora Xfce Spin
This is the simplest setup. One hard disk device in the system is installed, which is detected as sda and the entire disk will be used for the installation of Fedora 38 Xfce Desktop. All disk information in sda disk device will be permanently deleted by the installation wizard!

The Fedora 38 Xfce Desktop comes with:

  • linux kernel – 6.2.9
  • Xorg X11 server – 1.20.14 and Xorg X11 server XWayland 22.1.9 is used by default
  • Xfce: 4.18, which is the latest stable as of the official Xfce site.

For more packages and versions information the user may check out the Fedora 38 server articles – Software and technical details of Fedora Server 38 including cockpit screenshots.

We used the following ISO for the installation process:
https://download.fedoraproject.org/pub/fedora/linux/releases/38/Spins/x86_64/iso/Fedora-Xfce-Live-x86_64-38-1.6.iso
The ISO may be burnt on a disk or written on a USB stick. Just boot up from it.

The simplest way to make a bootable USB drive is to just use the Linux command dd. First, download the ISO file above and then plug the USB drive into the computer and find out the device name, it should be something of /dev/sda or /dev/sdb or /dev/sdc (execute the dmesg command in the console and check the last lines for the USB drive detection and its device name like /dev/sd?). After knowing the USB device name issue the dd command to overwrite it with the ISO. Note, all data will be lost if you use the following command with the device name mentioned in the command line.

myuser@mydesktop ~ # dd if=/mnt/media/OS/Fedora/Fedora-Xfce-Live-x86_64-38-1.6.iso of=/dev/sdd bs=8M status=progress oflag=direct
1610612736 bytes (1.6 GB, 1.5 GiB) copied, 11 s, 146 MB/s1683156992 bytes (1.7 GB, 1.6 GiB) copied, 11.4234 s, 147 MB/s

200+1 records in
200+1 records out
1683156992 bytes (1.7 GB, 1.6 GiB) copied, 11.4559 s, 147 MB/s

The USB flash drive should have at least 4G space. Using the dd command will overwrite the data on the USB drive without warning or confirmation!

The user can check what device name the just-plugged USB Drive has with dmesg console command:

myuser@mydesktop ~ # dmesg|tail -n 20
[1111445.079524] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1111445.079526] usb 3-2: Product: IS888 USB3.0 to SATA bridge
[1111445.079528] usb 3-2: Manufacturer: Innostor Technology
[1111445.079529] usb 3-2: SerialNumber: 088810000000
[1111445.083169] usb-storage 3-2:1.0: USB Mass Storage device detected
[1111445.083301] scsi host6: usb-storage 3-2:1.0
[1111446.092244] scsi 6:0:0:0: Direct-Access     KINGSTON  SNV425S2128GB        PQ: 0 ANSI: 0
[1111446.093165] sd 6:0:0:0: Attached scsi generic sg2 type 0
[1111446.093586] sd 6:0:0:0: [sdd] 250069680 512-byte logical blocks: (128 GB/119 GiB)
[1111446.093883] sd 6:0:0:0: [sdd] Write Protect is off
[1111446.093886] sd 6:0:0:0: [sdd] Mode Sense: 03 00 00 00
[1111446.094489] sd 6:0:0:0: [sdd] No Caching mode page found
[1111446.094497] sd 6:0:0:0: [sdd] Assuming drive cache: write through
[1111446.100093] GPT:Primary header thinks Alt. header is not at the end of the disk.
[1111446.100102] GPT:1402999 != 250069679
[1111446.100104] GPT:Alternate GPT header not at the end of the disk.
[1111446.100105] GPT:1402999 != 250069679
[1111446.100106] GPT: Use GNU Parted to correct GPT errors.
[1111446.100148]  sdd: sdd1 sdd2 sdd3
[1111446.100623] sd 6:0:0:0: [sdd] Attached SCSI disk

The just-plugged USB drive is attached to the system with the device name /dev/sdd.

SCREENSHOT 1) Boot from the UEFI USB Kingston drive.

It is the same as the UEFI USB CD/DVD-ROM bootable device. Choose the UEFI USB drive and boot the installation live drive.

main menu
UEFI BIOS USB boot

Keep on reading!

Review of freshly installed Fedora 38 KDE Plasma Desktop part 2 – System Settings

This is the part 2 of the Fedora 38 KDE Plasma Desktop review – Review of freshly installed Fedora 38 KDE Plasma Desktop (KDE GUI)
In part 2 only the System Settings of KDE Plasma is presented – the central place to configure and tweak the KDE Plasma – the graphical desktop environment with customizable layouts and panels, virtual desktops and sophisticated widgets. Some of the settings require an administrative account and whenever it is necessary the Plasma platform shows an authentication dialog to escalate privileges.
It worth mentioning the KDE Platform versions in Fedora 38:

  • KDE Plasma version: 5.27.4
  • KDE Frameworks version: 5.104.0, upgradable to 5.107.0
  • QT version: 5.15.8, upgradable to 5.15.10

The System Settings reflects the above versions and the functionality they incorporate.
The main components are:

  • Appearance
  • Workspace
    • Workspace Behavior
    • Windows Management
    • Shortcuts
    • Startup and Shutdown
    • Search
  • Personalization
    • Notifications
    • Users
    • Reginal Settings
    • Accessibility
    • Applications
    • KDE Wallet
    • Online Accounts
    • User Feedback
  • Network
    • Connections
    • Settings
  • Hardware
    • Input Devices
    • Display and Monitor
    • Audio
    • Power Management
    • Bluetooth
    • Color Corrections
    • KDE Connect
    • Printers
    • Removable Storage
    • Thunderbolt
  • System Administration
    • About this System
    • Software Update

System Settings may also be started from the console with

myuser@mydesktop ~ $ systemsettings

Here are the System Setting screenshots:

SCREENSHOT 1) Click on System Settings to launch the “System Settings” program.

View and edit KDE and some Linux system settings.

main menu
Main Menu – Favorites

Keep on reading!

Review of freshly installed Fedora 38 KDE Plasma Desktop (KDE GUI)

After the tutorial on how to install Fedora 38 KDE Plasma Desktop this tutorial is mainly to see what to expect from a freshly installed Fedora 38 KDE Plasma Desktop – the look and feel of the new KDE GUI (version 5.27.4 of KDE Plasma). The Fedora 38 KDE Plasma Desktop is part of Fedora spins – https://spins.fedoraproject.org/kde/
Here the user can find how to Install Fedora 38 KDE Plasma Desktop (KDE GUI). Here it worth mentioning the included versions of KDE software for Fedora 36:

  • KDE Plasma version: 5.27.4
  • KDE Frameworks version: 5.104.0, upgradable to 5.107.0
  • QT version: 5.15.8, upgradable to 5.15.10

The idea of this article is just to see what to expect from Fedora 38 KDE Plasma – the look and feel of the GUI, the default installed programs and their look and how to do some basic steps with them, it is included also screenshots of the KDE settings program. Here you’ll find more than 250 screenshots and not so many texts we do not want to turn this review of many texts and version information and 3 meaningless screenshots, which you could not see anything for the user interface because these days it is the primary goal of a Desktop system. You can expect more of this kind of review in the future. The big missing is the Kate Advanced Text Editor, which is not installed by default in this release.
This article is the first part of reviewing the Fedora 38 KDE Plasma. The second article contains KDE System Settings screenshots and it is Review of freshly installed Fedora 38 KDE Plasma Desktop part 2 – System Settings.

Some of the interesting screenshots

  • Logging
  • KDE Plasma Overview with Panel Toolbox
  • Fedora KDE main menu
  • Plasma Widgets
  • Activities
  • Install/Update applications with Discover
  • Install applications with dnfdragora
  • review of multiple installed GUI applications and games.
  • Dolphin – the KDE File Manager
  • KWrite – Text Editor

Fedora 38 KDE Plasma screenshots

SCREENSHOT 1) Fedora (6.2.9-300.fc38.x86_64) 38 (KDE Plasma)

main menu
grub entry boot

Keep on reading!

Install Fedora 38 KDE Plasma Desktop (KDE GUI)

This article will show the simple steps of installing a modern Linux Distribution like Fedora 38 KDE Plasma with KDE for the user graphical interface. First, it is offered the basic steps for installing the Operating system and then there are some screenshots of the installed system and its look and feel of it. Here is another article available with more screenshots of the installed and working Fedora 38 KDE PlasmaReview of freshly installed Fedora 38 KDE Plasma Desktop (KDE GUI). If the user is interested in Gnome as a graphical interface there are two articles on how to install Fedora 37 Workstation Edition, which comes with GNOMEInstall Fedora Workstation 38 (Gnome GUI) and Review of freshly installed Fedora 38 Workstation (Gnome GUI).
This is the simplest setup. One hard disk device in the system is installed, which is detected as sda and the entire disk will be used for the installation of Fedora 38 KDE Plasma. All disk information in sda disk device will be permanently deleted by the installation wizard!

The Fedora 38 KDE Plasma Desktop comes with

  • Xorg X server – 22.1.9 XWayland is used by default
  • linux kernel – 6.2.9
  • KDE Plasma version: 5.27.4
  • KDE Frameworks version: 5.104.0
  • QT version: 5.15.8

For more packages and versions information the user may check out the Fedora 38 server articles – Software and technical details of Fedora Server 38 including cockpit screenshots.

We used the following ISO for the installation process:

https://download.fedoraproject.org/pub/fedora/linux/releases/38/Spins/x86_64/iso/Fedora-KDE-Live-x86_64-38-1.6.iso

It is a LIVE image so you can try it before installing it. The easiest way is just to download the image and burn it to a DVD disk or to flush a USB drive with the ISO. Just use the Linux command dd and a USB flash drive. It’s worth mentioning the dd command will destroy all data on the USB drive and overwrite it with the Fedora KDE Live ISO, so be sure to use a UBS Flash, which data is not important or with no data on it. The dd command uses the ISO as input and the output is the USB drive in Linux device form as /dev/sd?. For the following dd command, the USB drive is /dev/sdd

dd if=/mnt/media/OS/Fedora/Fedora-KDE-Live-x86_64-38-1.6.iso of=/dev/sdd bs=8M status=progress oflag=direct
2306867200 bytes (2.3 GB, 2.1 GiB) copied, 14 s, 164 MB/s2408269824 bytes (2.4 GB, 2.2 GiB) copied, 14.6423 s, 164 MB/s

287+1 records in
287+1 records out
2408269824 bytes (2.4 GB, 2.2 GiB) copied, 14.6466 s, 164 MB/s

SCREENSHOT 1) Boot from the UEFI USB Drive Kingston device.

It is the same as the USB CD/DVD-ROM bootable removable drive. Choose the UEFI USB CD/DVD drive and boot the installation live drive.

main menu
UEFI BIOS DVD-ROM boot

Keep on reading!

Review of freshly installed Fedora 38 Workstation (Gnome GUI)

After Install Fedora Workstation 38 (Gnome GUI) this tutorial is mainly to see what to expect from a freshly installed Fedora 38 Workstation – the look and feel of the GUI (Gnome – version 44.0).

  • Xorg X11 server – 1.20.14 and Xorg X11 server XWayland 22.1.9 is used by default
  • GNOME (the GUI) – 44.0
  • linux kernel – 6.2.9

The idea of this tutorial is just to see what to expect from https://docs.fedoraproject.org/en-US/releases/f38/the look and feel of the GUI, the default installed programs, and their look and how to do some basic steps with them. Here the reader finds more than 214 screenshots and not so much text the main idea is not to distract the user with much text and version information and 3 meaningless screenshots , which the reader cannot see anything for the user interface, but these days the user interface is the primary goal of a Desktop system. Only for comparison there are couple of old versions reviews, too – Review of freshly installed Fedora 37 Workstation (Gnome GUI), Review of freshly installed Fedora 36 Workstation (Gnome GUI) and more.
For more details about what software version could be installed check out the Software and technical details of Fedora Server 38 including cockpit screenshots. The same software could be installed in Fedora 38 Workstation to build a decent development desktop system.

For all installation and review articles, real workstations are used, not virtual environments!

SCREENSHOT 1) Fedora Linux (6.2.9-300.fc38.x86_64) 38 (Workstation Edition)

main menu
grub 2.06 entry boot

Keep on reading!

Missing the CentOS Stream 9 CRB repository – nothing provides python3-pyxattr needed by

CentOS Stream 9 CRB repository is the name of the repository, which replaces the old CentOS Stream 8 PowerTools repository.

main menu
enable CRB
The CRB is an official repository, which stands for CodeReady Linux Builder repository. It includes multiple important packages mainly for developer packages (those with “-devel” in the name). The CRB packages may be found here: https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/.
When installing packages from community official or other repositories they may depend on packages in CRB repositories, but because it is not enabled by default, there will be a nasty error of broken dependencies like:

Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides python3-pyxattr needed by glusterfs-server-11.0-2.el9s.x86_64 from centos-gluster11-test
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

The package glusterfs-server-11.0-2.el9s.x86_64 needs the package python3-pyxattr, which cannot be found in all the enabled repositories on the system, so it appears the system is broken.

So the python3-pyxattr is part of the CRB repository so just enabling it will solve the problem:

[root@srv ~]# dnf config-manager --set-enabled crb
[root@srv ~]# dnf install -y glusterfs-server
CentOS Stream 9 - BaseOS                                                                 198 kB/s | 9.5 kB     00:00    
CentOS Stream 9 - AppStream                                                               26 kB/s |  10 kB     00:00    
CentOS Stream 9 - CRB                                                                    8.0 MB/s | 5.4 MB     00:00    
Dependencies resolved.
=========================================================================================================================
 Package                                Architecture    Version                     Repository                      Size
=========================================================================================================================
Installing:
 glusterfs-server                       x86_64          11.0-2.el9s                 centos-gluster11-test          1.2 M
Installing dependencies:
 attr                                   x86_64          2.5.1-3.el9                 baseos                          61 k
 device-mapper-event                    x86_64          9:1.02.195-1.el9            baseos                          33 k
 device-mapper-event-libs               x86_64          9:1.02.195-1.el9            baseos                          32 k
 device-mapper-persistent-data          x86_64          0.9.0-13.el9                baseos                         782 k
 glusterfs-cli                          x86_64          11.0-2.el9s                 centos-gluster11-test          185 k
 glusterfs-client-xlators               x86_64          11.0-2.el9s                 centos-gluster11-test          785 k
 glusterfs-fuse                         x86_64          11.0-2.el9s                 centos-gluster11-test          136 k
 glusterfs-selinux                      noarch          2.0.1-1.el9s                centos-gluster11                29 k
 libaio                                 x86_64          0.3.111-13.el9              baseos                          24 k
 libgfapi0                              x86_64          11.0-2.el9s                 centos-gluster11-test           95 k
 libgfchangelog0                        x86_64          11.0-2.el9s                 centos-gluster11-test           34 k
 lvm2                                   x86_64          9:2.03.21-1.el9             baseos                         1.5 M
 lvm2-libs                              x86_64          9:2.03.21-1.el9             baseos                         1.0 M
 python3-pyxattr                        x86_64          0.7.2-4.el9                 crb                             35 k
 rpcbind                                x86_64          1.2.6-5.el9                 baseos                          58 k

Transaction Summary
=========================================================================================================================
Install  16 Packages

Total download size: 6.0 M
.....
.....
  python3-pyxattr-0.7.2-4.el9.x86_64                         rpcbind-1.2.6-5.el9.x86_64                                 

Complete!

Listing packages of the CRB repository is simple enough.

[root@srv ~]# dnf repository-packages crb list
Last metadata expiration check: 1:26:16 ago on Mon 19 Jun 2023 12:50:59 PM UTC.
Installed Packages
python3-pyxattr.x86_64                       0.7.2-4.el9                        @crb
Available Packages
CUnit-devel.i686                             2.1.3-25.el9                       crb 
CUnit-devel.x86_64                           2.1.3-25.el9                       crb 
Judy-devel.i686                              1.0.5-28.el9                       crb 
Judy-devel.x86_64                            1.0.5-28.el9                       crb 
LibRaw-devel.i686                            0.20.2-6.el9                       crb 
LibRaw-devel.x86_64                          0.20.2-6.el9                       crb 
.....
.....

Apparently, CentOS Stream 9 installation should include EPEL and CRB repositories in addition to the base ones.
Almost half of the files are developments files (i.e. “-devel”) packages and others are additional libraries, mainly Python 3 and Perl modules, OpenJDK 17, 11, 1.8.0 slow debug and fast debug, and more.

Firewalld and how to preserve the original source IP when forwarding to internal IP

Using firewalld and the forwarding options (IP or port forward) might work not as expected if the default setup is left on the system. Consider the simple example:

main menu
Internet <-> router <-> local network

The purpose is to forward a port to a server in the local network, which should be easy enough. Let the forwarding port be 80 and the server should receive the original source IP. To archive this task the system administrator should do the following on the router with firewalld service. Here is one of the simplest methods:

  • When the router’s external IP/interface and the router’s internal IP/interface are in the same firewalld zone. The zone is named “public” in the CentOS world.

The solution uses the masquerade rule added with a rich rule (–add-rich-rule), not the masquerade option of the zone (–add-masquerade).
The default configuration will assign the external interface and the internal interface, which may be a virtual one, in the same firewalld zone such as “public”. When this happens, activating the masquerade option will break the source IP and it will be replaced by the Netfilter with the internal IP address of the router and the internal server will see all incoming connections on the forwarded port as if they were coming from the internal router IP. All different IPs coming to this port will be replaced with the router’s internal IP and forwarded to the server’s internal.

The router’s external IP/interface and the router’s internal IP/interface are in the same firewalld zone.

This solution is demonstrated with a virtual interface – bridge br0, but it may be a network interface. By default, when the bridge is created, it will be added to the default zone, which is “public” in CentOS world. Use –get-active-zones to check the active zones and the assigned interfaces.

[root@srv ~]# firewall-cmd --get-active-zones
public
  interfaces: eth0 br0
[root@srv ~]# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: br0 eth0
  sources: 
  services: cockpit dhcpv6-client http https ssh
  ports: 10022/tcp
  protocols: 
  forward: yes
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules:

If the options forward and masquerade are activated (i.e. yes on the above output) and a forward rule to an internal local IP (some server IP connected to the bridge br0) is introduced to the firewall, the local server will receive all connection attempts to the forwarded port, but the source IP will be overwritten with the gateway IP of the internal (local network). For example, the bridge br0 has IP 192.168.0.1 and the eth0 has Internet IP 1.1.1.1. Forwarding port 1.1.1.1:80 to a server behind the bridge br0 with IP 192.168.0.100:
Keep on reading!

Switch to a new master (primary) in MySQL InnoDB Cluster 8

Switching to a new master (or new primary if to use the new naming) in a MySQL 8 InnoDB Cluster is simple with the MySQL Shell console and the function of the cluster variable – setPrimaryInstance.

main menu
MySQL Shell with setPrimaryInstance

Why would someone need to do it manually? One of the reasons may be because one of the nodes is on the same physical server and thus suppose a smaller latency.

First, get a cluster object of the cluster by connecting to the cluster API with MySQL Shell:

[root@db-cluster-1 ~]# mysqlsh
MySQL Shell 8.0.28

Copyright (c) 2016, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.

Type '\help' or '\?' for help; '\quit' to exit.
 MySQL  JS > \connect clusteradmin@db-cluster-1
Creating a session to 'clusteradmin@db-cluster-1'
Fetching schema names for autocompletion... Press ^C to stop.
Your MySQL connection id is 166928419 (X protocol)
Server version: 8.0.28 MySQL Community Server - GPL
No default schema selected; type \use <schema> to set one.
 MySQL  db-cluster-1:33060+ ssl  JS > var cluster = dba.getCluster()

Second, show the status of the cluster to get the cluster topology and the exact nodes’ names, which will use as an argument of the setPrimaryInstance. Still, in the MySQL Shell Console:

 MySQL  db-cluster-1:33060+ ssl  JS > cluster.status()
{
    "clusterName": "mycluster1", 
    "defaultReplicaSet": {
        "name": "default", 
        "primary": "db-cluster-2:3306", 
        "ssl": "REQUIRED", 
        "status": "OK", 
        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.", 
        "topology": {
            "db-cluster-1:3306": {
                "address": "db-cluster-1:3306", 
                "memberRole": "SECONDARY", 
                "mode": "R/O", 
                "readReplicas": {}, 
                "replicationLag": null, 
                "role": "HA", 
                "status": "ONLINE", 
                "version": "8.0.28"
            }, 
            "db-cluster-2:3306": {
                "address": "db-cluster-2:3306", 
                "memberRole": "PRIMARY", 
                "mode": "R/W", 
                "readReplicas": {}, 
                "replicationLag": null, 
                "role": "HA", 
                "status": "ONLINE", 
                "version": "8.0.28"
            }, 
            "db-cluster-3:3306": {
                "address": "db-cluster-3:3306", 
                "memberRole": "SECONDARY", 
                "mode": "R/O", 
                "readReplicas": {}, 
                "replicationLag": null, 
                "role": "HA", 
                "status": "ONLINE", 
                "version": "8.0.28"
            }
        }, 
        "topologyMode": "Single-Primary"
    }, 
    "groupInformationSourceMember": "db-cluster-2:3306"
}

Keep on reading!