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

End-to-end Files API service component with config driven through PARMLIB #435

Closed
4 tasks
stevenhorsman opened this issue Apr 15, 2019 · 0 comments
Closed
4 tasks
Assignees
Labels
Cupids Work for the Install and Package rework
Milestone

Comments

@stevenhorsman
Copy link
Member

stevenhorsman commented Apr 15, 2019

As a Zowe user,
I want to be able to start the files apis service with the configuration passed in at runtime via a PARMLIB and have a separate user_directory/workspace for my instance data
so that I can make changes to my zowe config without having to reinstall and lose my config.

Details/notes
We'll follow the pattern set out in #433 for launching a component and apply it to the files api.

  • During install, we'll need to create the fork of run-zowe.sh (run-zowe-cupids.sh) and add new files api required properties:
    ROOT_DIR - the install directory of zowe
    USER_DIR - the workspace location for this instance. Add to yaml
    JAVA_HOME
    FILES_API_PORT - the port this service will use
    ZOSMF_PORT
    ZOSMF_IP_ADDRESS
    STC_NAME
    COMPONENTS=files-api (or whatever the files component id is to indicate that we're only starting this)
  • Longer term we don't want the install to override the parameters if it exists, but migrate it, or let the user, but that needs to be cover elsewhere TODO create placeholder Note if the PARMLIB already exists we should not overwrite but allow the ability to migrate and introduce new PARMS. Day one we should introduce a version number in the PARMLIB

data-sets-api component

  • Create <ROOT_DIR>/components/files-api/bin/validate.sh to validate required parameters follow on item Component variable validation for Files API service #445

  • Move <ZOWE_ROOT_DIR>/explorer-data-sets-api/scripts/data-sets-api-server-start.sh to <ROOT_DIR>/components/files-api/bin/start.sh and modify it so that it the variables that used to be injected in at install time will use the variable names specified

Launch

  • We need to change run-zowe.sh's fork to remove dirname $0/../../explorer-data-sets--api/scripts/data-sets-api-server-start.sh` and instead

  • do a for loop over the COMPONENTS concatenation and call
    <ROOT_DIR>/components//bin/validate.sh Component variable validation for Files API service #445 (In the initial release we'll have all the properties defined and not worry about generating defaults TODO - check generate story)

  • Check the USER_DIR for any existing activeConfig file and back it up if it exists in format /backup_configuration.YY.MM.DD.HH.MM.SS (based on the date of when the config was created?)

    • Create a new active_configuration.cfg properties file with all the parsed parmlib properties stored in it, along with the date-timestamp of when it was created in the key=value format.
    • Create a new workspace in the USER_DIR if it doesn't exist. The workspace should include a copy of the manifest.json file from the <ROOT_DIR>.
  • (In the initial release we won't support config migration TODO - create migration story)

  • do a for loop over the COMPONENTS concatenation and call
    <ROOT_DIR>/components//bin/start.sh (remembering that files-api will be the only component at this point.

Questions?

  • do we want to generate the static api-def for the data-set-server at this time. If so we might need to create a variable for this location, or just derive it from the ROOT_DIR* -
    Answer Yes but longer term we need to move the api-defs into the configuration area when we tackle the story for starting the api-mediation
  • How do we want to use Vitek's trick to label the files service address space with the compoenent's 2 letter code in this story?
    Answer Use better identifier names for ZOWESVR address spaces #385 covers more detail on _BPX_JOBNAME. For this story use _BPX_JOBNAME={ZOWE_PREFIX}EAF1 java for "File API" in the start.sh script. ZWESRV comes from the variable STC_NAME

Acceptance Criteria

Given an run-zowe.sh forked script with defining all the require properties (listed above)
When I run start ZOWE to drive the script
Then ZOWE should start successfully
And the files APIs should have a api definition pointing at port <FILES_API_PORT>
And when I look at the zowe job address spaces through display active, I can see the unique FILES API code added
And The files REST APIs should be available on port <FILES_API_PORT>

Given an environment variables defining all the require properties (listed above)
When I run <ROOT_DIR>/files-api/bin/start.sh
Then the files APIs should have a api definition pointing at port <FILES_API_PORT>
And when I look at the zowe job address spaces through display active, I can see the unique FILES API code added
And The files REST APIs should be available on port <FILES_API_PORT>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cupids Work for the Install and Package rework
Projects
None yet
Development

No branches or pull requests

2 participants