From 5ffad66429cf69c8679e194dceec886fee61fb9b Mon Sep 17 00:00:00 2001 From: "Pavel Milanes (CO7WT)" Date: Wed, 20 Feb 2019 00:59:46 -0500 Subject: [PATCH] Refs #1, Changed the node by minion paradigm in all users texts to reflect the fact that non manager nodes are just minions runnig skywire/node app --- README.md | 6 ++--- skyflash/data/skyflash-cli | 47 ++++++++++++++++++++------------------ skyflash/data/skyflash.qml | 12 +++++----- skyflash/skyflash.py | 17 +++++++------- 4 files changed, 43 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 32e1db0..d5363f8 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The preferred method to configure & flash skybian images is by using this GUI to ### Installing -To install this tool, go to the [Releases](https://github.com/skycoin/skyflash/releases) link on this page and grab the file corresponding to your OS, use the following table to figure it out: +To install this tool, go to the [Releases](https://github.com/skycoin/skyflash/releases) link on this page and grab the file corresponding file to your OS, use the following table to figure it out: | Operating System | You must download the one... | |:----------------:|:--------------------------------:| @@ -49,14 +49,14 @@ For a default configuration of skybian as a skyminer you just need to run it lik ./skyflash-cli -a Skybian-0.1.0.img ``` -This will generate 8 images, one for the manager and 7 nodes. Network configuration is the skyminers default: +This will generate 8 images, one for the manager and 7 minions. Network configuration is the skyminers default: * Network: 192.168.0.0/24 * Netmask: 255.255.255.0 (aka: /24) * Gateway: 192.168.0.1 * DNS servers: 1.0.0.1, 1.1.1.1 * Manager IP: 192.168.0.2 -* Node IPs: 192.168.0.[3-9] (7 nodes) +* Minions IPs: 192.168.0.[3-9] (7 minions) If you need a different setup just check the `skyflash-cli -h` to know more, for example for a manager and 22 nodes with this details: diff --git a/skyflash/data/skyflash-cli b/skyflash/data/skyflash-cli index 71b82f4..c2bb351 100755 --- a/skyflash/data/skyflash-cli +++ b/skyflash/data/skyflash-cli @@ -44,8 +44,8 @@ OPTIONS: -g: Gateway IP for the network -m: Manager IP on the network -d: DNS to use, can be more than one like this "1.0.0.1, 1.1.1.1" - -n: [A-B] the range of the IPs to use on the network - -a: All defaults set networks by the defaults + -n: [A-B] the range of the IPs to use on the network for the minions + -a: All defaults: set networks by the defaults -v: Version of the script -i: Image file @@ -55,7 +55,7 @@ Network defaults: Gateway: 192.168.0.1 DNS servers: 1.0.0.1, 1.1.1.1 Manager IP: 192.168.0.2 - Node IPs: 192.168.0.[3-9] (7 nodes) + Minion IPs: 192.168.0.[3-9] (7 minions) Warnings: * By now you need to provide the downloaded image to the script, no download @@ -70,25 +70,28 @@ Warnings: * Option '-n' refers to the last digit of the IPv4 address, base is taken from the manager. It´s a continuous range from A to B [A-B] both inclusive -Configured images will be placed on the same directory of the base image and will be -appened the suffixes: '-manager' and 'nodeN' where N is a incremental number from 0 +Configured images will be placed on the same directory of the base image and +will be appened the suffixes: '-manager' and 'minionN' where N is a +incremental number from 0 Examples: - Configure a base image with defaults: 8 images, one manager and 7 nodes, gw is - 192.168.0.1, 192.168.1.2 is the manager and 192.168.1.3..192.168.1.9 are nodes + Configure a base image with defaults: 8 images, one manager and 7 minions, + gw is 192.168.0.1, 192.168.1.2 is the manager and 192.168.1.3..192.168.1.9 + are minions $0 -a skybian.img - Configure 1 manager and 10 nodes, network 192.168.100.0/24, gw is 192.168.100.254 - manager is 192.168.100.50 & nodes are 192.168.100.90 - 192.168.100.99 + Configure 1 manager and 10 minions, network 192.168.100.0/24, gw is + 192.168.100.254 manager is 192.168.100.50 & minions are 192.168.100.90 + - 192.168.100.99 $0 -g 192.168.100.254 -m 192.168.100.50 -n 90-100 -i skybian.img - The same of above but with custom DNS servers (using a local forwarder) please - note the use of the "" to glob both servers on one argument and the ', ' - separating the DNS servers IPs + The same of above but with custom DNS servers (using a local forwarder) + please note the use of the "" to glob both servers on one argument and + the ', ' separating the DNS servers IPs - $0 -g 192.168.100.254 -m 192.168.100.50 -n 90-100 \ + $0 -g 192.168.100.254 -m 192.168.100.50 -n 90-100 \\ -d "192.168.100.254, 1.1.1.1" -i skybian.img EOF @@ -146,7 +149,7 @@ function set_defaults() { # check for blank/bad arguments. function blank_bad_args() { # exits with an error if an arg is missing, else pass silent - local raw=`echo "Gateway:$1 Manager:$2 Nodes:$3 Image:$4 DNS:$5" | xargs` + local raw=`echo "Gateway:$1 Manager:$2 Minions:$3 Image:$4 DNS:$5" | xargs` for arg in $raw ; do # extract @@ -210,7 +213,7 @@ function validate_generate_nodes() { # validate start 255: - self.uiError.emit("Validation error", "The node IP distribution is beyond 255, please lower your manager ip", - "The IP of the nodes are distributed from the manager IP and up, if you set the manager node IP so high the node count may not fit") - logging.debug("Manager IP to high, last node will be {} and that's not possible".format(endip)) + self.uiError.emit("Validation error", "The nodes IP distribution is beyond 255, please lower your manager ip", + "The IP of the minions are distributed from the manager IP and up, if you set the manager node IP so high the minion count may not fit") + logging.debug("Manager IP to high, last minion will be {} and that's not possible".format(endip)) return False # validation #5, gw not in manager & nodes range if int(gw[gw.rfind('.') + 1:]) in range(int(manager[manager.rfind('.') + 1:]), endip): - self.uiError.emit("Validation error", "Please check your GW, Manager & Node selection, the GW is one of the Nodes or Manager IPs", - "When we distribute the manager & nodes IP we found that the GW is one of that IP and that's wrong") - logging.debug("GW ip is on generated nodes range.") + self.uiError.emit("Validation error", "Please check your GW, Manager & Minion selection, the GW is one of the Minions or Manager IPs", + "When we distribute the manager & Minions IP we found that the GW is one of that IP and that's wrong") + logging.debug("GW ip is on generated Minions range.") return False # If you reached this point then all is ok @@ -1021,9 +1022,9 @@ def buildTheImages(self, data_callback, progress_callback): # new file and it's name nodeNick = "manager" if nip != self.netManager: - nodeNick = "node-" + str(actual) + nodeNick = "minion-" + str(actual) - nodeName = "Skywire_your_" + nodeNick + ".img" + nodeName = "Skybian_your_" + nodeNick + ".img" nnfp = os.path.join(self.localPath, nodeName) newNode = open(nnfp, 'wb')