Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an Amazon AMI from scratch and store the commands for doing so in the METplus repo. #859

Closed
21 tasks
JohnHalleyGotway opened this issue Mar 30, 2021 · 10 comments · Fixed by #2269
Closed
21 tasks
Assignees
Labels
alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle component: release engineering Release engineering issue component: training Training issue priority: medium Medium Priority requestor: Community General Community type: task An actionable item of work
Milestone

Comments

@JohnHalleyGotway
Copy link
Collaborator

Describe the Task

This task is very similar to METplus #506. However for METplus #506, we started with the existing METviewer AMI from NOAA and added the other METplus components to it. The goal for this issue is to create a script to construct a METplus AMI totally from scratch, without starting from the METviewer NOAA AMI.

The majority of the work should already be done for #506 and can be incorporated into an AMI build script. Recommend storing the resulting METplus build AMI script somewhere in the METplus repo, but I don't know exactly where yet.

Time Estimate

Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.

Sub-Issues

Consider breaking the task down into sub-issues.

  • Add a checkbox for each sub-issue here.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Review projects and select relevant Repository and Organization ones or add "alert:NEED PROJECT ASSIGNMENT" label
  • Select milestone to next major version milestone or "Future Versions"

Define Related Issue(s)

Consider the impact to the other METplus components.

Task Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s), Project(s), Milestone, and Linked issues
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@hankenstein2
Copy link
Contributor

sudo apt install git
sudo apt install python3
sudo apt install python3-dev
sudo apt install gcc
sudo apt install gfortran
sudo apt install make
sudo apt install unzip
sudo apt install g++
sudo apt install m4
sudo apt install build-essential
sudo apt install libc++-dev
sudo apt install emacs
sudo apt install python3-pip
sudo apt install libhdf5-dev
sudo apt install libnetcdf-dev
sudo pip3 install netCDF4
sudo pip3 install numpy
sudo pip3 install xarray - installs pandas - needs min 4gb memory
sudo pip3 install argparse

@ian-noaa
Copy link

Thanks, Hank! A couple of questions:

  • Are there any version constraints on the Debian dependencies you installed? I'm suspecting I'll be handed a CentOS 7 base instance.
  • How did you configure the environment for the compile_MET_all.sh script?
  • Did you need to do any installation with the tar_files.tgz and met-10.0.1.20211201.tar.gz tarballs?
  • Was there any other configuration required for the other parts of the METplus suite (METplus wrappers, METCalcPy/PlotPy, METdatadb), or are those installed by compile_MET_all.sh?

@hankenstein2
Copy link
Contributor

hankenstein2 commented Feb 24, 2022 via email

@jprestop
Copy link
Collaborator

jprestop commented Feb 24, 2022

@fisherhucar It would be great if you could check in your configuration file (perhaps install_met_env.aws?) at this location:
https://github.com/dtcenter/MET/tree/develop/scripts/installation/config

@ian-noaa
Copy link

ian-noaa commented Mar 7, 2022

I've been referencing the various MET & METplus install docs as well as the MET Dockerfile which was quite helpful and have successfully installed MET on a CentOS 7 AMI. However, I had some additional questions after doing so.

Thus far I've:

  1. Installed MET dependencies listed in the MET Dockerfile & listed by Hank above
  2. Downloaded & compiled MET with compile_MET_all.sh and a custom env file that sets TEST_BASE, COMPILER, MET_SUBDIR, MET_TARBALL, USE_MODULES, PYTHON_LOG, MET_PYTHON, and MET_PYTHON_{LD,CC}
  3. Cloned METplus & then called manage_externals/checkout_externals -e build_components/Externals.cfg

This has lead to a few questions:

  1. It looks like METplus's checkout_externals also can build MET. So did I need to do step 2? Or did I do this out of order?
  2. Additionally, does METplus need anything set or persisted in the environment so that it can find the MET binaries?
  3. Is there a traditional installation location for METplus? Based on the environment Hank provided above, I'm guessing the default is to install everything in /opt. Is that correct?

@hankenstein2
Copy link
Contributor

hankenstein2 commented Mar 7, 2022 via email

@georgemccabe
Copy link
Collaborator

A few follow up notes:

@ian-noaa
Copy link

ian-noaa commented Mar 8, 2022

Thanks George & Hank,

Regarding #1068 - I had noticed the issue with Externals.cfg as well. I worked around it by changing the branch lines to tag lines. Would it be better to patch Externals.cfg with the correct branch name? Likewise, if MET isn't ready for the build_components script - can I just remove the MET section from the Externals.cfg file so that it skips that install?

Thanks for the tip on the config files. Setting things up in defaults.conf does sound like the way to go.

Are the release tarballs different from the git repo contents for METplus? Since this AMI will be used for work on METplus I'll need the METplus git repo's develop branch checked out on the AMI.

@georgemccabe
Copy link
Collaborator

I did not know that tag was a valid key in Externals.cfg. That is good to know! With that knowledge I'll have to think about if it is better to use branches or tags here. Using the main_vX.Y branch will obtain any bugfixes, which is nice. I wasn't aware that the manage externals logic could install. I thought that it only obtained the code from the repositories.

The release tar files pertain to MET and can be found here: https://dtcenter.org/community-code/metplus/download
Here is an example: https://github.com/dtcenter/MET/releases/download/v10.0.1/met-10.0.1.20211201.tar.gz
You have to use one of these tar files to install the MET executables. A script is run to prepare the contents of the MET Git repo for a release.

You can use the METplus develop branch, but I would warn you that it is risky to do so since that branch is constantly changing with new development. It is also more difficult to tell the state of the code using develop since the version number output in the log files does not narrow down exactly which commit was used. Using a stable version of METplus is safer and makes it easier to debug issues because the exact state of the code can be easily obtained or examined.

@georgemccabe georgemccabe added the component: training Training issue label Dec 5, 2022
@JohnHalleyGotway JohnHalleyGotway moved this from Todo to In Progress in METplus-Wrappers-5.1.0 Development Jul 26, 2023
@georgemccabe georgemccabe linked a pull request Jul 27, 2023 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle component: release engineering Release engineering issue component: training Training issue priority: medium Medium Priority requestor: Community General Community type: task An actionable item of work
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants