use kd link for installing klient on connected vms · Issue #8514 · koding/koding · GitHub
Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

use kd link for installing klient on connected vms #8514

Closed

Description

@rjeczalik

Currently we use the following link to install klient on user vms:

curl -sL https://kodi.ng/s | bash -s 629a9f26

Since we disabled auto-updates for managed klient due to kd mount issues, user has no mean to update klient on his connected vm.

We should instead use regular kd link for connecting vm:

curl -sL https://kodi.ng/c/p/kd | bash -s 17ec2083

Which will also install kd and make it possible to sudo kd update. We would also have only one way for installing klient which will greatly reduce maintenance cost.

We should also ensure a managed klient installed via kd link shows up on the sidebar, I've tested it on current production and it does not show up. It shows up, I was not patient enough.

In the long term we should enable the auto-updates. (/cc @leeola)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

  1. rjeczalik commented on Jul 21, 2016

    @rjeczalik
    ContributorAuthor

    On a second though it's possible to enable autoupdate for connected vms only - #8515.

    However it would be nice to have only one way to install klient.

    Ideally I would move the whole functionality from bash scripts to the binary (either kd or klient - kd currently is able to install klient) and store kite keys and whole configuration in boltdb (related #8509).

    wdyt? (/cc @cihangir @szkl)

  2. rjeczalik commented on Jul 27, 2016

    @rjeczalik
    ContributorAuthor

    connected vm link does not work for ubuntu 16.04, using kd link instead would have fixed that

  3. gokmen commented on Jul 29, 2016

    @gokmen
    Contributor

    so, will kd installer provide the same functionality with klient installer? I mean will it start running klient and register the machine to kontrol automatically? or do user need to do something else after installation?

  4. rjeczalik commented on Jul 29, 2016

    @rjeczalik
    ContributorAuthor

    Right both kd and klient installers do the same - they both register machine to kontrol and start klient. The only difference is that no managed jMachine doc is created for klient kontrol (as there's no managed machine modal for kd that does this I guess).

    I'm going to rework machine registration with #8548, so taking the opportunity I could also make kontrol insert managed jMachine doc so user machine shows on the sidebar. This way separate "connected machine" or "your own machine" modal becomes obsolete. Moreover we have only one way of installing klient.

    wdyt?

  5. gokmen commented on Jul 29, 2016

    @gokmen
    Contributor

    That would be perfect, we shouldn't provide two different ways to install same thing. Add your own machine modal was doing the check on kontrol to get the latest register machine that we still may need to update the machine list or we can send a notification to trigger reload for machines otherwise they won't see the machine on their sidebars until they reload.

  6. gokmen commented on Jul 29, 2016

    @gokmen
    Contributor

    Should I update the installer link to use the proposed one? Will it work as expected for now or do I need to wait for your updates on that?

  7. rjeczalik commented on Jul 29, 2016

    @rjeczalik
    ContributorAuthor

    Probably you'd need to wait, since right now installing kd won't make your vm appear in sidebar (I guess there's no manage doc created?).

    What kind of relationships do we need in mongo in order to make a vm appear in sidebar under the Managed VMs?

  8. gokmen commented on Jul 29, 2016

    @gokmen
    Contributor

    We can still use the existing modal for that request but we will provide kd installer instead so it should work as is (I assume) because currently that modal is querying kontrol and if founds a new machine then it requests from backend to create the JMachine document.

    No relationship is required only requirement is that the users list of JMachine document needs to be proper for the active user and group.

  9. rjeczalik commented on Jul 29, 2016

    @rjeczalik
    ContributorAuthor

    modal is querying kontrol and if founds a new machine then it requests from backend to create the JMachine document.

    So if we just replace the link with the kd one it'll work out of the box and no need for kontrol to create jMachine docs, correct?

  10. gokmen commented on Jul 29, 2016

    @gokmen
    Contributor

    @rjeczalik yes, if that kd install scripts registers the machine we're good to go.

  11. rjeczalik commented on Jul 29, 2016

    @rjeczalik
    ContributorAuthor

    Let's do this 🎉

  12. 6 remaining items

  13. modified the milestones: August 2016, July 2016 on Jul 29, 2016
  14. leeola commented on Sep 1, 2016

    @leeola
    Contributor

    I think the "Koding Connector Service" debian package is having issues with Ubuntu 14 now, lots of error cases. Can we bump this up in priority?

    Also, @rjeczalik do you think #8935 blocks this? I know you mentioned it, but what are your thoughts?

  15. rjeczalik commented on Nov 21, 2016

    @rjeczalik
    ContributorAuthor

    The kontrol.register method should create a jMachine managed document with newly registered KD Daemon. This way we could get rid of connected VM modal and connect external vms just by installing kd.

    /cc @gokmen

  16. modified the milestone: August 2016 on Nov 22, 2016
  17. gokmen commented on Jun 6, 2017

    @gokmen
    Contributor

    @rjeczalik this is the only change required

    diff --git a/client/app/lib/providers/managed/addmanagedmachinemodal.coffee b/client/app/lib/providers/managed/addmanagedmachinemodal.coffee
    index e47c8061f7..16d5c8e4a1 100644
    --- a/client/app/lib/providers/managed/addmanagedmachinemodal.coffee
    +++ b/client/app/lib/providers/managed/addmanagedmachinemodal.coffee
    @@ -87,7 +87,7 @@ module.exports = class AddManagedMachineModal extends ContentModal
           then "export KONTROLURL=#{KodingKontrol.getKontrolUrl()} CHANNEL=devmanaged; "
           else ''
    
    -    cmd = "#{kontrolUrl}curl -sL https://kodi.ng/s | bash -s #{token}"
    +    cmd = "#{kontrolUrl}curl -sL https://kodi.ng/c/p/kd | bash -s #{token}"
    
         @loader.destroy()

    but we do have a weird error with installer;

    Installing "KD"...
    
        Current version: -
        Latest version: 0.1.108
    
    error executing "install" command: error installing "KD": open /usr/local/bin/kd: text file busy
    

    so, I couldn't try it out for the rest of the flow.

  18. gokmen commented on Aug 10, 2017

    @gokmen
    Contributor

    @rjeczalik can you check this out again? ^^

  19. rjeczalik commented on Aug 10, 2017

    @rjeczalik
    ContributorAuthor

    @gokmen Do I need to do anything special to reproduce it? I've just tried the new url and it works.

  20. gokmen commented on Aug 10, 2017

    @gokmen
    Contributor

    if it's working then we can apply the patch I provided and close the issue I believe.

  21. added 2 commits that reference this issue on Aug 10, 2017
    a06b5f3
    d8bc863
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions