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

Add install_env.sh to install environmental dependencies #15

Open
wants to merge 29 commits into
base: develop
Choose a base branch
from

Conversation

catzzz
Copy link
Contributor

@catzzz catzzz commented Feb 2, 2022

This PR adds install_env.sh to fix #1 and #8.
The install_env.sh is modified from [slacgismo/gridlabd/install.sh](https://github.com/slacgismo/gridlabd/blob/master/install.sh)

Current issues

None

Code changes

  • add install_env.sh
  • add /build-aux/setup-Darwin-21.sh
  • add /build-aux/setup-Dawin-manual.sh
  • add /build-aux/setup-Dawin.sh
  • add /build-aux/setup-Linux-amzon-2.sh
  • add /build-aux/setup-Linux-centos-8.sh
  • add /build-aux/setup-Linux-debian-11.sh
  • add /build-aux/setup-Linux-ubuntu-22.sh
  • add /build-aux/setup-Linux.sh
  • add /build-aux/setup-manual.sh
  • add /test_docker_env/Dockerfile.cnetos8.sh
  • add /test_docker_env/Dockerfile.debian11.sh
  • add /test_docker_env/Dockerfile.ununtu22.sh

Documentation changes

To install the OpenFIDO CLI, enter the following command at the command prompt:

1). This repository runs under docker container. Please make sure you have docker installed and have docker server run. For docker installation, please check https://docs.docker.com/get-docker/ for detail.

2). Install enviromental dependencies.

sudo ./install_env.sh [-v|--info|-h|-f|--no-setup]

Options

  • -h|--help Print this helpful output
  • --info Print information about this install
  • -v|--verbose Run showing log output
  • -s|--silent Run without showing commands
  • -f|--force Force install into existing target folder
  • --no-setup Perform system setup

support OS

  • Mac OSX: Monterey
  • Ubuntu: 22.04
  • Debian: 11
  • CentOS: 8
  • Amazon EC2
    • In Amazon EC2, Please run sudo export PATH=/usr/local/bin:$PATH first to setup the PATH.

3). make install.

make install

Test and Validation Notes

None

@catzzz catzzz added the enhancement New feature or request label Feb 2, 2022
@catzzz catzzz self-assigned this Feb 2, 2022
@catzzz catzzz requested a review from dchassin February 2, 2022 19:30
Copy link
Contributor

@dchassin dchassin left a comment

Choose a reason for hiding this comment

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

The README file is confusing because it does not clearly distinguish between environment setup and installation of cli itself. Please clarify that install.sh still installs the code but does not setup the environment, while install_env.sh sets up the environment for the cli to run (and maybe should be called setup.sh instead)

@catzzz
Copy link
Contributor Author

catzzz commented Feb 3, 2022

Code change

  • Rename install_env.sh to setup.sh
  • Add make setup command to setup environment.
  • Remove --no-setup option after setup.sh command
  • Update README.md file

Documentation changes

OpenFIDO Command Line Interface (CLI)

Installation

To install the OpenFIDO CLI, enter the following command at the command prompt:

Setup environment

If cmake had been installed in your system, run:

make setup

or you can use shell command with options:

sudo ./setup.sh [-v|--info|-h|-f]

Setup options

  • -h|--help Print this helpful output
  • --info Print information about this install
  • -v|--verbose Run showing log output
  • -s|--silent Run without showing commands
  • -f|--force Force install into existing target folder

support platfrom

  • Mac OSX: Monterey
  • Ubuntu: 22.04
  • Debian: 11
  • CentOS: 8
  • Amazon EC2
    • In Amazon EC2, Please run sudo export PATH=/usr/local/bin:$PATH first before run make setup command.

Install CLI

This program needs to run inside the docker. Please make sure you have docker server installed and run in your system. For docker installation, please check https://docs.docker.com/get-docker/ for detail.

Install the opnenfido cli from the respository by command:

make install

@dchassin
Copy link
Contributor

dchassin commented Mar 1, 2022

Centos:8 is dead. Long live oraclelinux.

@dchassin
Copy link
Contributor

@catzzz, there are still a number of problems with this PR.

I'm still confused about the objective of this PR. I thought the purpose was to add backup and restore to the server options so server admins can save the database for later restore.

The rest of the changes still seem unrelated to this objective and should be part of one or more new PRs to address developer instructions and options we can review separately at a more leisurely pace. The backup and restore options are urgently needed and everything else is just getting in the way of deploying those options.

README.md

  • The Installation section leads into Setup environment without providing the command prompt. The instructions for installation should be for ordinary users and should remain a one-liner. If additional setup needs to be done, it should be included in the one-line setup command without using git clone.
  • The setup environment should be only for developers who use git clone to download the source code. As a general rule in CEC and DOE projects, the developer instructions are provided in the Wiki and the user instructions in the README.md. This needs to be clarified.
  • The instructions for Backup and Restore stand out as the only command options that have documentation. It's a good idea to documents options, but if we document some, we must document all.
  • I don't understand why backup and restore use a different option for image name than the other commands. Why not use the same option, i.e., --imagename NAME:TAG for all server commands?
  • There seems to be an unresolved conflict still in the file (see <<<<<<< HEAD =======)
  • The text for Setup environment is not ready, e.g., "If cmake had been installed..." should instead say that cmake is required. Either you need cmake or you don't need it. If the shell command always works, then why not use only that and do away with the Makefile.

Makefile

  • The make help has a typo in setup target

install.sh

  • The script now says it's downloading the openfido install command from github. That's not what it's doing. It's installing the CLI directly from github.

install_dev.sh

  • The scripts says mentions releasing openfido to PyPI. We have not discussed this yet. Please separate this into a new PR so we can review what we are doing before we release it.

build-aux folder

  • All of these scripts are copied from GridLAB-D's setup scripts. Why? If openfido depends on GridLAB-D, then make it so by ensuring GridLAB-D is install. But if that's the case we need to review this requirement, because it was designed to not be directly dependent on GridLAB-D and instead use docker images of GridLAB-D whenever it needed to run GridLAB-D.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants