Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Syncing /opt between different computers. Good idea?

  1. #1

    Question Syncing /opt between different computers. Good idea?

    Hi,

    I have a few applications that I download manually and install in the /opt folder in my 4 Linux computers. Whenever there's an update to any of them I have to manually download, unpack and replace the application on every computer. While 4 computers are not a big deal, I would like to save time and make sure I don't forget one or more computers.
    I'm thinking of syncing the /opt directory between those computers using Syncthing. Since all configuration of these applications and user data resides in the home directories I don't foresee any problem with this approach. Am I missing something? Do you think it is a good idea?

    Thanks for your input.
    A.B.

  2. #2
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,700

    Default Re: Syncing /opt between different computers. Good idea?

    openSUSE installs various software in opt/, but not AFAICT in /usr/local/. On this 42.3 opt/ contains 3 directories, kde3, gnome and brother. I put all my outside-the-package-system apps in /usr/local/, and have no problem syncing it among machines.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

  3. #3

    Default Re: Syncing /opt between different computers. Good idea?

    I'll try syncing and report if i have any issues.

    Quote Originally Posted by mrmazda View Post
    On this 42.3 opt/ contains 3 directories, kde3, gnome and brother.
    In Leap 15 and Tumbleweed /opt in empty. I remember it being empty on 42.3 as well. Are you sure those directories are not installed by any manually installed packages?

    Thanks for the reply.

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,171

    Default Re: Syncing /opt between different computers. Good idea?

    I assume that at least /opt/kde3 is a left over from long ago ( I have it on a 13.1 with still KDE3 stuff installed).

    I assume that syncing /opt between systems you all manage can be an option to maintain the software located there, as long there are no parts of those software products outside /opt and as long as there are no configuration files of those products somewhere in /opt that should differ between the systems.
    Henk van Velden

  5. #5
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,700

    Default Re: Syncing /opt between different computers. Good idea?

    Quote Originally Posted by abadr View Post
    Are you sure those directories are not installed by any manually installed packages?
    Depends on the meaning of manual. I don't remember whether the Brother printer drivers came as mere script or if rpm was involved. I have no idea why gnome is there, as I never install anything Gnome on purpose. It's nothing but a tree of directories. kde3 is there because that's where Zypper and/or YaST2 puts it. My own scripts, fonts, Mozilla products and more all go in /usr/local/. I know I've see *office files in /opt/ on some PCs.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

  6. #6
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,867
    Blog Entries
    14

    Default Re: Syncing /opt between different computers. Good idea?

    I'd never do this with syncing. F.e. Google installs their applications in /opt/google, Nodejs installs built apps in /usr/local
    But, a good one for you ( and not only for this issue ) would be to use saltstack. It's not hard to setup, has lots of internal commands that can be used, and lets you manage X machines from a single spot. This:
    Code:
    # salt '*' pkg.upgrade
    updates 12 machines, i.e. 3 CentOS VPSes, 4 Leap 15 PC's, 2 Tumbleweed VPSes, my Tw laptop and 2 Rpi3's with Leap. And yes, it will invoke 'yum update', 'zypper up', 'zypper dup' depending on the OS running on the minions ( clients ).
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,171

    Default Re: Syncing /opt between different computers. Good idea?

    Quote Originally Posted by Knurpht View Post
    I'd never do this with syncing. F.e. Google installs their applications in /opt/google, Nodejs installs built apps in /usr/local
    But, a good one for you ( and not only for this issue ) would be to use saltstack. It's not hard to setup, has lots of internal commands that can be used, and lets you manage X machines from a single spot. This:
    Code:
    # salt '*' pkg.upgrade
    updates 12 machines, i.e. 3 CentOS VPSes, 4 Leap 15 PC's, 2 Tumbleweed VPSes, my Tw laptop and 2 Rpi3's with Leap. And yes, it will invoke 'yum update', 'zypper up', 'zypper dup' depending on the OS running on the minions ( clients ).
    Does that cover the OP's case where he "installs" by extracting an archive file (no high level tools like yum/zypper, etc. involved)
    Henk van Velden

  8. #8
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,867
    Blog Entries
    14

    Default Re: Syncing /opt between different computers. Good idea?

    Quote Originally Posted by hcvv View Post
    Does that cover the OP's case where he "installs" by extracting an archive file (no high level tools like yum/zypper, etc. involved)
    Yup. Anything can be done through salt, that can be done on a local machine. F.e.
    Code:
    salt 'cloud.knurpht.nl' cmd.run '/home/knurpht/bin/NCupgrade'
    calls a script on host cloud.knurpht.nl that pulls in the latest Nextcloud archive, sets the running version to maintenance mode, performs the upgrade ( incl. a backup ), and removes maintenance mode. Please note the replacement of '*' by a single hostname, where wildcards could have been used as well, f.e. 'centos*' . Pretty easy to pull in a script on multiple machines and run it. It could even be done without the script, but instead by creating a so called salt-state file on the master ( the salt server ).
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  9. #9

    Default Re: Syncing /opt between different computers. Good idea?

    Quote Originally Posted by Knurpht View Post
    But, a good one for you ( and not only for this issue ) would be to use saltstack. It's not hard to setup, has lots of internal commands that can be used, and lets you manage X machines from a single spot. This:
    It's very interesting that you recommend a configuration management solution. I've been wanting to try them out for a while but didn't have much time. I see that the popular ones are ansible, chef, salt and puppet. Can you advise on which one is the easiest to use and fastest to setup for a very small network and a couple of VPS?

    edit: also can salt or the others add the menu item for these manually extracted applications in the KDE menu?

    Thanks.

  10. #10
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,867
    Blog Entries
    14

    Default Re: Syncing /opt between different computers. Good idea?

    Quote Originally Posted by abadr View Post
    It's very interesting that you recommend a configuration management solution. I've been wanting to try them out for a while but didn't have much time. I see that the popular ones are ansible, chef, salt and puppet. Can you advise on which one is the easiest to use and fastest to setup for a very small network and a couple of VPS?

    edit: also can salt or the others add the menu item for these manually extracted applications in the KDE menu?

    Thanks.
    I got to Salt after seeing a talk at an openSUSE Conference. The setup is quite easy. Decide which machine will be the salt-master, install salt-minion on all other machines, I followed this one here: https://docs.saltstack.com/en/latest...lkthrough.html

    AFAIK creating a .desktop file and putting that in the right place should be enough for creating KDE menu entries.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •