GitHub – Cloverleaf – working with the repository

Clovertech Forums Cloverleaf GitHub – Cloverleaf – working with the repository

Tagged: 

  • Creator
    Topic
  • #121918
    Rob Lindsey
    Participant

      We have been asked within our environment to start using GitHub a.s.a.p.  I am looking for how best to do the setup on a cloverleaf server and how to make it work with the IDE.  We are running on RHEL Linux.  I believe I have to have download some types of programs that will run and allow my developers to work on Tclprocs, Sites, etc.

      Looking for any an ALL information I can get my hands on.

      Thanks in advance for any and all advice

      Rob Lindsey

    Viewing 7 reply threads
    • Author
      Replies
      • #121919
        David Barr
        Participant

          Cloverleaf can’t work with multiple developers like normal software projects. If two developers make separate clones of the repo, they can’t both be running at the same time since Cloverleaf relies on having a single HCISITEDIR and specific file/folder structure under that.

          What we’ve done is have all of our users open SSH sessions to their own accounts, sudo over to the hci account, and run version control commands as hci. We’re still using SVN since we haven’t seen much need to switch to GIT given the Cloverleaf restrictions.

          You could probably put all of your files from HCIROOT into a repo, use .gitignore files to exclude folders that aren’t maintained locally at your site, and make separate branches for test and production. Commit files to your test branch, merge them into the production branch and pull them from your prod server.

          Like I said, we’re still on SVN and we do something similar, so hopefully someone who manages their environment with GIT can respond.

        • #122117
          Kevan Riley
          Participant

            Hi Rob,

            Its been a while since you posted this, do you still need any help with Cloverleaf and Git/GitHub?  I’ve been using GitHub with cloverleaf for 5+ years now including as a team of developers.

            Kevan Riley

          • #122121
            Ramachandran R
            Participant

              Dear Kevan,
              I am glad to hear that you have successfully integrated Git with Cloverleaf. I am curious to know whether you achieved this integration through the IDE or by manually committing changes from the backend.
              Also, are you currently leveraging Git primarily for backup purposes, or do you have other specific use cases?

              Thank you.
              Ram.

            • #122124
              Kevan Riley
              Participant

                Hi Ram,

                Our git process is not integrated with the IDE; we run the git commands from the prompt on the backend.  It did occur to me to create commands to exec from the “Remote Commands” feature of the IDE, but ultimately, for us it would be too complex to include all of our processes, and we have backend access for our team members, so there was no real need to do so.

                We do use git beyond just backup.  The backup aspect and version history is pretty helpful.  We use the Web UI for merge (Pull) request merging, which is also very nice.  In addition, we use git for code promotion.  We do not allow push from the Prod env.  All changes must be made in test/dev and pushed to git.  Then we pull down to prod.  That way prod is always based on the master branch in git (for that site, see below).  We make heavy use of the globalVaraibles.ini to handle our test vs dev vs prod parameters.  Each site has a test, dev, prod, version of the globalVariables.ini.  We copy the appropriate one into place after the pull.

                We manage branches at the site level, not the root.  Each site has its own “Master” branch.  This allows us to work on seperate sites amoung the team with minimal merge conflicts.

                Kevan Riley

              • #122356
                Michael Brande
                Participant

                  Kevin,

                  Are you running a git repository in the root? If you use the CL GUI how are you doing that with git?

                • #122358
                  Kevan Riley
                  Participant

                    Hi Michael,

                    We do not check in/ check out code at the Cloverleaf root.  We manage our code at the site level.  We have found this created much less headaches with merges.  In place of a single “master” branch, we have a master (or production) branch for each site (including one for our master site).  We branch from and merge into these “production” branches.  Our Producrtion environments are “pull” only (we actually use a fetch / reset process).

                    As to GUI/IDE integration, we do not.  We manage our git activities from the backend over SSH.  It might be possible to create and “allow” commands throught the IDE using the Remote Commands feature, but I have not spent any time investigating that since we have backend access.

                    Kevan R.

                  • #122359
                    Michael Brande
                    Participant

                      Kevin,

                      Ok that makes sense at the site level! That is awesome man! We plan to implement that one day here!

                    • #122360
                      Kevan Riley
                      Participant

                        Hi Michael,

                        It had worked out great for us.  One tip, to save you some future difficulties.  Some of the directories created by an hcisiteinit are empty.  git does not track empty direcrtories.  So we create file called .empty for directories like Tables, tclprocs, java_uccs/src, etc. anywhere there might not bee any files.  Because, if one of these direcoties go missing processes wont start and sometimes it is not clear why.

                        Not purely git related but we make heavy use of the globalVariable functionality.  We have globalVariable INI files for Prod and for Test (and Dev).  We use this for any directories, ports, IP address etc. in the NetConfig.  That way after pulling from git, we just copy over  (overwrite)  the globalVariable.ini file with the approriate one for the specific environment (test, prod, etc.).

                         

                        Good luck,

                        Kevan R.

                    Viewing 7 reply threads
                    • You must be logged in to reply to this topic.