8000 Reduce or eliminate files written by the visor & apps · Issue #1940 · skycoin/skywire · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Reduce or eliminate files written by the visor & apps 8000 #1940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
0pcom opened this issue Feb 28, 2025 · 0 comments
Open

Reduce or eliminate files written by the visor & apps #1940

0pcom opened this issue Feb 28, 2025 · 0 comments

Comments

@0pcom
Copy link
Collaborator
0pcom commented Feb 28, 2025

The files written by the visor are mostly useless or unnecessary & only complicate the installation / clutter the installation path. If no files need be written at runtime then the installation just consists of executable and no files need to be written, this simplifies a lot.

$ find /opt/skywire/local/*
/opt/skywire/local/apps-pid.txt
/opt/skywire/local/custom
/opt/skywire/local/log
/opt/skywire/local/log/skywire-2025-02-27T20-42-53.196.log
/opt/skywire/local/log/skywire.log
/opt/skywire/local/node-info.json
/opt/skywire/local/reward.txt
/opt/skywire/local/skychat
/opt/skywire/local/skychat_log.db
/opt/skywire/local/skysocks
/opt/skywire/local/skysocks-client
/opt/skywire/local/skysocks-client_log.db
/opt/skywire/local/skysocks_log.db
/opt/skywire/local/transport_logs
/opt/skywire/local/transport_logs/2025-02-27.csv
/opt/skywire/local/transport_logs/2025-02-22.csv
/opt/skywire/local/transport_logs/2025-02-26.csv
/opt/skywire/local/transport_logs/2025-02-23.csv
/opt/skywire/local/transport_logs/2025-02-24.csv
/opt/skywire/local/transport_logs/2025-02-28.csv
/opt/skywire/local/transport_logs/2025-02-25.csv
/opt/skywire/local/vpn-client
/opt/skywire/local/vpn-client_log.db

None of these files are critical.

  • the transport bandwidth logging should be reported to the transport discovery on re-registration or de-registration of the transport
  • /opt/skywire/local/custom the custom path for serving files over dmsghttp isn't really used and should just be deprecated. Better functionality currently exists in the skywire dmsg web command.
  • logging already appears in STDERR. The log files are used for viewing logging in the hypervisor, which is a seldom utilized feature.
  • /opt/skywire/local/reward.txt is not really used as the reward system gets the reward address from the survey. We should add reward address to the visor config.

Looking up one directory we see the following files & folders:

apps  bin  dmsghttp-config.json  local  scripts  services-config.json  skywire.json

  • The dmsghttp-config.json will be eliminated and embedded defaults will be used. The user can provide their own override file and specify that to config gen if using a custom deployment is desired.
  • The services-config.json same as the above case
  • The main config skywire.json can technically be ephemeral or piped from STDOUT of config gen to STDIN of the visor via the -n flag on each respective command. The human editable skywire.conf file simply needs to support all possible flags and there needs to be flags for everything in the visor's config.

reference skywire cli config gen -q

$ skywire cli config gen -q
#
# /etc/skywire.conf
#
#########################################################################
#	SKYWIRE CONFIG TEMPLATE
#		Defaults for booleans are false
#		Uncomment to change default value
#########################################################################

### Installation path ###################################################

#--	Default config paths for the installer or package (system paths)
#PKGENV=true

#--	Default config paths for the current userspace
#USRENV=true

#--	fallback service conf path
#SVCCONF="services-config.json"

#--	dmsghttp config path
#DMSGCONF="dmsghttp-config.json"

#--	Output path of the config file
#OUTPUT='./skywire-config.json'

#--	Set app bin_path
#BINPATH='./apps'

### Deployment ##########################################################

#--	Set custom service conf URLs
#SVCCONFADDR=('')

#--	Use test deployment
#TESTENV=true

#--	Use dmsghttp to connect to the production deployment ; overrides BESTPROTO=true
#DMSGHTTP=true

#--	Number of dmsg serverts to connect to (0 unlimits)
#MINDMSGSESS=8

#--	Automatically determine the best protocol (dmsg or http)
#	based on location to connect to the deployment servers
#BESTPROTO=true

### Transports ##########################################################

#--	Other Visors will automatically establish transports to this visor
#	requires port forwarding or public ip
#VISORISPUBLIC=true

#--	Disable auto-transports to public visors from this visor
#DISABLEPUBLICAUTOCONN=true

#-- Add transport setup public keys
#TPSETUPPKS('')

### Ports ###############################################################

#- set port for UDP connections / SUDPH transports
#SUDPHPORT=0

#- set port for TCP connections / STCPR or STCP transports
#STCPRPORT=0

### Routing #############################################################

#-- Add route setup-node public keys
#ROUTESETUPPKS('')

### Remote Access #######################################################

#--	Set remote hypervisor public keys
#HYPERVISORPKS=('')

#--	Grant access to pseudoterminal (pty) for public keys
#DMSGPTYPKS('')

### Survey Access #######################################################

#--	Grant access for survey collection to these public keys
#SURVEYPKS('')

### Hypervisor UI #######################################################

#--	Start the hypervisor interface for this visor
#ISHYPERVISOR=true

### Apps ################################################################

#--	Display the node ip in the service discovery
#	for any public services this visor is running
#DISPLAYNODEIP=true

#--	Autostart vpn server for this visor
#VPNSERVER=true

#--	Set server public key for proxy client to connect to
#PROXYCLIENTPK=''

#--	Enable autostart of the proxy client
#STARTPROXYCLIENT=true

#--	Disable autostart of proxy server
#NOPROXYSERVER=true

#--	Set a password for the proxy server
#PROXYSEVERPASS=''

#--	Password for the proxy client to access the server
# (if password is set for the server)
#PROXYCLIENTPASS=''

#--	Set VPN client killswitch
#VPNKS=true

#--	Set vpn server public key for the vpn client to use
#ADDVPNPK=''

#--	Password for vpn client to access the server
# (if password is set for the server)
#VPNCLIENTPASS=''

#--	Set password to the vpn server
#VPNSEVERPASS=''

#--	Change secure mode status of vpn server
#VPNSEVERSECURE=''

#--	Set VPN Server network interface - i.e. eth0
#VPNSEVERNETIFC=''

### Miscellaneous #######################################################

#--	Set secret key
#SK=''

#--	Custom config version override
#VERSION=''

#--	Set visor runtime log level.
#	Default is info ; uncomment for debug logging
#LOGLVL=debug

This file is basically user created or created automatically outside of the installation path, and the visor's json config generated from any customization specified in it.

So,, the local path can be totally omitted, the json configs can be omitted because they are embedded, and the apps, bin, and scripts can all just go into the executable path such as /usr/bin/ And at that point, the /opt/skywire path can itself be eliminated.

This will mean that no directory or file need be created by running skywire and existing directories can be used for installing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0