Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Copy uninstall scripts #1232

Merged
merged 11 commits into from
Apr 4, 2019
Merged

Conversation

Amndeep7
Copy link
Contributor

@Amndeep7 Amndeep7 commented Mar 21, 2019

This PR solves #303 which is to copy the uninstall scripts over to /opt/google so that the user can uninstall the program without having to keep around the source code. In particular, the changes make it so that the uninstall scripts and their dependencies are moved over to the /common directory during the staging process, and then during the install process the installation script moves over its respective uninstall script along with the common.sh dependency to the /install directory. The version.txt dependency is moved to the base /opt/google directory since the uninstall scripts look for that file in the superdirectory from where they are.

As part of the development process, I and @tst-lsavoie discovered a bug with khEnvironment.py where we didn't check to see if a builder existed before we tried to use it in the alias function. This PR includes a fix for that bug since it was a blocker on implementing the PR.

Verification:

  1. Build and stage-install OpenGEE. All files should be in the /common subdirectory in the staging area.
  2. Install either or both fusion and server. version.txt should be in the base /opt/google directory, common.sh should be in /install along with the respective uninstall script for whichever install scripts you ran.
  3. When you run one or both uninstall scripts, then /opt/google should be empty besides version.txt and the /install directory. If both are installed and only one product is uninstalled, then /opt/google should only be missing whatever is taken away but leaving whatever is necessary for the other product to work. The uninstall scripts and their dependencies are not removed in either case since that is under the scope of Uninstall the uninstall scripts #488.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@Amndeep7
Copy link
Contributor Author

I signed the cla, also tagging #303 to get the link

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes Manual verification that all contributors have signed the CLA. and removed cla: no labels Mar 21, 2019
@Amndeep7
Copy link
Contributor Author

Amndeep7 commented Mar 21, 2019

Seeing this error pop up when running from installation directory:

[root@centos7geedev install]# ./uninstall_fusion.sh 
cat: ../version.txt: No such file or directory

Uninstalling Google Earth Enterprise Fusion 
[...]

Seems like it's looking for earth_enterprise/src/version.txt. I'm not sure how to make $LONG_VERSION redirect to some other location if we're running this from the installation directory as opposed to from the code repository.

@tst-lsavoie
Copy link
Collaborator

Can you copy the version.txt file when you're copying the uninstall files?

@Amndeep7
Copy link
Contributor Author

Yes; however, I think we'll still run into issues since the cat command is looking for that file in the directory above. If you think we can throw that file into the base /opt/google/ directory, then I'll do that.

@tst-lsavoie
Copy link
Collaborator

I can live with that.

@Amndeep7
Copy link
Contributor Author

Just about to push up the documentation changes that I forgot to add originally. Do we need to update the wiki as well?

https://github.com/google/earthenterprise/wiki/Install-Fusion-or-Earth-Server#uninstalling-gee-fusion-and-server

@tst-lsavoie
Copy link
Collaborator

Good catch. We should update the wiki as well, though we should wait until this PR is merged. There's no way to attach a wiki update to a PR.

…install so as to allow the uninstall scripts to state the version of the product (google#303)
@tst-nfarah-zz tst-nfarah-zz added this to the 5.3.0 milestone Mar 22, 2019
@tst-nfarah-zz
Copy link
Collaborator

Let's add description referencing the bug being fixed and verification steps: (ex. Install OpenGEE using scripts, ... Verify that un-installation scripts (uninstall_fusion.sh, ...) are now in opt/google, Install Fusion and Server using those scripts, Verify that OpenGEE is removed ...etc.)

Copy link
Collaborator

@tst-nfarah-zz tst-nfarah-zz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had few comments

docs/geedocs/5.3.0/answer/4492617.html Outdated Show resolved Hide resolved
<li>Navigate to the location at which you initially cloned the GEE git repo.</li>
<li>Within the GEE git repo, navigate to <code>earthenterprise/earth_enterprise/src/installer</code>
and run the <code>uninstall_fusion.sh</code> and <code>uninstall_server.sh</code> scripts.</li></ol></div>
<li>Navigate to the location at which you initially cloned the GEE git repo or to the installation location (<code>/opt/google</code>).</li>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add this enhancement to release notes (5.3.0/answer/7160007.html) under New Features

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done regarding adding that to new features

regarding the bug half of this pr, does it need to be listed under the resolved issues section?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what was the bug ? this was a feature enhancement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we need to log that issue then documented that it was fixed under resolved issue

<li>Navigate to the location at which you initially cloned the GEE git repo.</li>
<li>Within the GEE git repo, navigate to <code>earthenterprise/earth_enterprise/src/installer</code>
and run the <code>uninstall_fusion.sh</code> and <code>uninstall_server.sh</code> scripts.</li></ol></div>
<li>Navigate to the location at which you initially cloned the GEE git repo or to the installation location (<code>/opt/google</code>).</li>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's document that the now the scripts to un-install can be run from opt/google in https://github.com/google/earthenterprise/wiki/Install-Fusion-or-Earth-Server under section Uninstalling GEE fusion and server

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1232 (comment)

I asked about this, but @tst-lsavoie wants to wait until the PR is merged before making this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realized that I could provide a draft:

Run uninstall scripts from earthenterprise/earth_enterprise/src/installer or from /opt/google/install if you have it installed.

sudo ./uninstall_fusion.sh
sudo ./uninstall_server.sh

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm, I think it's safest to wait on changing the wiki until the PR is merged since there's no way to peg a wiki change to a specific PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

docs/geedocs/5.3.0/answer/3499964.html Outdated Show resolved Hide resolved
docs/geedocs/5.3.0/answer/4492617.html Outdated Show resolved Hide resolved
earth_enterprise/SConstruct Show resolved Hide resolved
@Amndeep7
Copy link
Contributor Author

Let's add description referencing the bug being fixed and verification steps: (ex. Install OpenGEE using scripts, ... Verify that un-installation scripts (uninstall_fusion.sh, ...) are now in opt/google, Install Fusion and Server using those scripts, Verify that OpenGEE is removed ...etc.)

Completed adding the description @tst-nfarah

<li>Within the GEE git repo, navigate to <code>earthenterprise/earth_enterprise/src/installer</code>
and run the script <code>uninstall_server.sh</code>.</li></ol></div>
</ul><div class="footer"><p class="BackToTop"><a href="#top_of_file">Back to top</a> <hr /></p> <p class="copyright">&copy;2015 Google</p></div>
<li>Navigate to the location at which you initially cloned the GEE git repo or to the installation location (<code>/opt/google</code>).</li>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't quite make sense to me to have this in a separate bullet. I think it would work better combined with the bullet below.
image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment on the other document.

Copy link
Collaborator

@tst-lsavoie tst-lsavoie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added some minor comments but overall this looks good. I've also tested the changes with no issues.

This PR has gotten caught up in the release process. We just created the branch for release 5.3.0, which means that this change is now going into release 5.3.1. That means that the documentation and release notes changes need to be moved to the 5.3.1 versions of those documents. I know that's a bit of a pain; one of us can take care of it if you prefer.

@tst-nfarah-zz tst-nfarah-zz removed this from the 5.3.0 milestone Apr 1, 2019
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no and removed cla: yes Manual verification that all contributors have signed the CLA. labels Apr 4, 2019
Copy link
Collaborator

@tst-ccamp tst-ccamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I backed out the doc changes from 5.3.0 so they can be done in the 5.3.1 folder instead. So, this PR can go ahead and be merged.

@tst-ccamp tst-ccamp merged commit a16e2d2 into google:master Apr 4, 2019
husf-dsheremata added a commit to husf-dsheremata/earthenterprise that referenced this pull request Jun 4, 2019
* 'master' of https://github.com/google/earthenterprise:
  1270 Fix xml parsing in common.sh (google#1271)
  1192 update openjpeg to 2.3.1 (google#1269)
  Documented required boost dependency for Ubuntu 14 (google#1264)
  [WIP] Resolve issue google#798 - investigate Qt build performance (google#1245)
  Copy uninstall scripts (google#1232)
  refresh commit
  Issue google#1255 - Limits internal version string to 3 parts to fix various errors with patch releases (google#1256)
  Move build number to release rpm (google#1252)
  fix version
  link up 5.3.1 doc folder (google#1249)
  I1246 create 5.3.1 doc folder from copy of 5.3.0 doc folder (google#1248)
  change version files over to 5.3.1 (google#1247)
  start of 5.3.1
  Fixes google#279 - Admin Console password will be preserved on GEE server upgrade (google#1243)
  google#1201 - Fix issue with setting source date when using .kip directories (google#1234)
  I1228 Add y-scroll-bar to GLC Assembly webpage (google#1230)
  google#1236 Polygons constructor can accept KML as a string (google#1239)
  I1225 Re-add GROUPNAME to install_server.sh (google#1233)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants