You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 15, 2022. It is now read-only.
In an effort to remove complexity of the installations, deploys and updates, i propose we remove managed channel all together. Something is either production, or development. This means all klientctl installations will also use production/development, and klientctl updating would be handled by Klient during the auto update routine.
Requirements:
Klient and Kientctl binaries should be built with the same version number.
Klient needs to update the klientctl binary if it exists on the system.
Klient should not update if there is an active mount. What defines an active mount is yet to be determined. (this helps ensure an auto update does not occur during a fuse file operation, etc)
i imagine for the 3rd checkbox (do not update during active mounts), the most reliable method would be to simply have auto update check the count of mounts, and not update if it's > 0. Most performant too.
In the event that someone always has a mount, there can be a method on Klient for checking an update, and then trigger said updating via sudo kd update as it is now.
I'd love to have klient reworked first, in particular the way we handle passing configuration to it - right now we inject information like protocol.Environment, config.KontrolURL and recently config.TunnelURL during compile time, and this is why we need to compile it multiple times.
In order to have working klient user needs this infromation plus a kite.key, which is generated on behalf of the user by kontrol during registration. Additionally klient has three sources of configuration on the filesystem - /etc/kite/kite.key, ~/.config/koding/klient.bolt and /opt/kite/klient/klient.sh, where the first one (/etc/kite/kite.key) causes headaches when, I as a developer, switch between production / sandbox environment.
I think it would be better to rework how we handle configuration by adding registerKlient method to kontrol. The method would work essentially the same as current register with the difference it will respond with klient.bolt instead of kite.key. The klient.bolt would be initial configuration required to start the klient by user - it will be a BoltDB file that contains a key with a kite.key, protocol.Environment and all the information we currently inject with linker.
Then it would be possible to have only one binary which would be configured at runtime. Having configuration moved to a BoltDB would be a first step.
Second step is to get rid of a /opt/kite/klient/klient.sh wrapper script. The script is required to set things like username, kontrolURL and other klient's command line flags. If we instead save those command line flags again to BoltDB and make a thin CRUD around it (like klient configure set debug=true, klient configure get kontrolURL, klient configure list) it would be possible to ease toggling configuration switches like debug flag for the end users (currently they need to edit a wrapper script in a proper place etc. which is not a pleasant UX).
And third and last step would be to have a kite method for remotely configuring these BoltDB configuration, so you as a developer could troubleshoot user klient with e.g. kloudctl and remotely toggle debug flag (we currently have storage.set and storage.get so most probably not much work here would be required).
To summarize:
Currently klient has 3 sources of configuration:
/etc/kite/kite.key
~/.config/koding/klient.bolt
/opt/kite/klient/klient.sh (+ service init files)
Merging it all to ~/.config/koding/klient.bolt would simplify installation, make it possible to get rid of multiple compilations during deploy, ease reworking installation procedure, ease adding new configuration (vs adding another -X linker flag) and enable klient for new features like remote config.
I think i didn't understand the definite requirement behind moving all configuration into BoltDB.
What kind of configuration do we store in BoltDB ATM? When we first implemented it was only used for session based, best-effort durable storage medium (ie, terminal sessions, machine shared usernames), if it is not there, or empty, our klient could be still working/should be able to start.
I think it would be better to rework how we handle configuration by adding registerKlient method to kontrol.
This sounds like leaking our abstraction into a bigger component, other users of kontrol/kite wont have klient
Second step is to get rid of a /opt/kite/klient/klient.sh wrapper script.
I think this is inevitable way to go after unifying them
klient configure list
a nice feature that could be implemented later, i don't see it as a necessity right before unifying them
Last one, getting rid of kite.key is a huge task that is most likely wont be backward compatible and huge undertake right now - we can open a task on koding/kite and track the progress over there
@cihangir Let's move the discussion to #8965. I've addressed your concerns plus added an explanation of the problem. I was listing problems from top of my head, so I may miss some problems that configuration v2 will help to solve.
Activity
leeola commentedon Sep 1, 2016
i imagine for the 3rd checkbox (do not update during active mounts), the most reliable method would be to simply have auto update check the count of mounts, and not update if it's
> 0. Most performant too.In the event that someone always has a mount, there can be a method on Klient for checking an update, and then trigger said updating via
sudo kd updateas it is now.rjeczalik commentedon Sep 2, 2016
I'd love to have klient reworked first, in particular the way we handle passing configuration to it - right now we inject information like
protocol.Environment,config.KontrolURLand recentlyconfig.TunnelURLduring compile time, and this is why we need to compile it multiple times.In order to have working klient user needs this infromation plus a kite.key, which is generated on behalf of the user by kontrol during registration. Additionally klient has three sources of configuration on the filesystem - /etc/kite/kite.key, ~/.config/koding/klient.bolt and /opt/kite/klient/klient.sh, where the first one (/etc/kite/kite.key) causes headaches when, I as a developer, switch between production / sandbox environment.
I think it would be better to rework how we handle configuration by adding
registerKlientmethod to kontrol. The method would work essentially the same as currentregisterwith the difference it will respond withklient.boltinstead ofkite.key. Theklient.boltwould be initial configuration required to start the klient by user - it will be a BoltDB file that contains a key with a kite.key,protocol.Environmentand all the information we currently inject with linker.Then it would be possible to have only one binary which would be configured at runtime. Having configuration moved to a BoltDB would be a first step.
Second step is to get rid of a /opt/kite/klient/klient.sh wrapper script. The script is required to set things like username, kontrolURL and other klient's command line flags. If we instead save those command line flags again to BoltDB and make a thin CRUD around it (like
klient configure set debug=true,klient configure get kontrolURL,klient configure list) it would be possible to ease toggling configuration switches like debug flag for the end users (currently they need to edit a wrapper script in a proper place etc. which is not a pleasant UX).And third and last step would be to have a kite method for remotely configuring these BoltDB configuration, so you as a developer could troubleshoot user klient with e.g. kloudctl and remotely toggle debug flag (we currently have
storage.setandstorage.getso most probably not much work here would be required).To summarize:
Currently klient has 3 sources of configuration:
Merging it all to ~/.config/koding/klient.bolt would simplify installation, make it possible to get rid of multiple compilations during deploy, ease reworking installation procedure, ease adding new configuration (vs adding another
-Xlinker flag) and enable klient for new features like remote config.wdyt? /cc @cihangir @szkl
cihangir commentedon Sep 5, 2016
I think i didn't understand the definite requirement behind moving all configuration into BoltDB.
What kind of configuration do we store in BoltDB ATM? When we first implemented it was only used for session based, best-effort durable storage medium (ie, terminal sessions, machine shared usernames), if it is not there, or empty, our klient could be still working/should be able to start.
This sounds like leaking our abstraction into a bigger component, other users of kontrol/kite wont have klient
I think this is inevitable way to go after unifying them
a nice feature that could be implemented later, i don't see it as a necessity right before unifying them
Last one, getting rid of kite.key is a huge task that is most likely wont be backward compatible and huge undertake right now - we can open a task on koding/kite and track the progress over there
rjeczalik commentedon Sep 7, 2016
@cihangir Let's move the discussion to #8965. I've addressed your concerns plus added an explanation of the problem. I was listing problems from top of my head, so I may miss some problems that configuration v2 will help to solve.
[-]Remove managed klient entirely[/-][+]kd: remove managed klient entirely[/+]