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 installation file for ubuntu and osx #524

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

davidmanzanoai
Copy link
Contributor

What's changing

Provide a clear and concise description of the content changes you're proposing. List all the
changes you are making to the content.

The script allows in a easy way to set up the local environment for starting the development or local usage of the tool. It secures that docker, docker-compose and even git is installed or otherwise do it for you. Once downloaded the script, it requires to add chmod +x install-lumigator.sh. After, you decide how to execute it:

  • l local files: your lumigator code is within the current folder or in the folder set with -d option.
  • m means installation method, in case you don't have the code or it is a fresh installation it will download the code from github (using your credentials) or with a zip file containing the whole repo. It takes care of the folder in case this already exits. If it is, it is possible to force overwritting the folder with a fresh installation using "-o"
  • Updated section...
  • Added new...
  • Removed outdated information from...
  • Fixed a typo in...
  • ...

If this PR is related to an issue or closes one, please link it here.

Refs #...
Closes #...

How to test it

Steps to test the changes:

  1. Download the script and run chmod +x
  2. ./instal-lumigator.sh -m zip -d FOLDER_NAME OR .install-lumigator.sh -m git -d FODER_NAME
  3. Check it in the website if lumigator UI is running

Additional notes for reviewers

Anything you'd like to add to help the reviewer understand the changes you're proposing.

I already...

  • Tested the changes in a working environment to ensure they work as expected
  • Added some tests for any new functionality
  • Updated the documentation (both comments in code and product documentation under /docs)
  • Checked if a (backend) DB migration step was required and included it if required

@davidmanzanoai davidmanzanoai added help wanted Extra attention is needed do-not-merge PRs that should NOT be merged while this label is present labels Dec 17, 2024
@davidmanzanoai davidmanzanoai self-assigned this Dec 17, 2024
@Kostis-S-Z
Copy link
Member

works on my machine (:

install_lumigator.sh Outdated Show resolved Hide resolved
install_lumigator.sh Outdated Show resolved Hide resolved
@davidmanzanoai davidmanzanoai added enhancement New feature or request and removed do-not-merge PRs that should NOT be merged while this label is present labels Dec 20, 2024
@agpituk
Copy link
Contributor

agpituk commented Dec 27, 2024

Thanks for this @davidmanzanoai ! I've got some general questions about the approach, more than the technical implementation. If we're trying to have a way for people to install lumigator easily, I think this tool shouldn't clone the repository at all (as it's not needed to run lumigator!) My favored approach here would be to have a script like this one, that pulls the docker-compose & run the start-lumigator command, we probably would like to have a specific docker-compose as well for that one with pre-initiated variables. What are your thoughts?

@davidmanzanoai
Copy link
Contributor Author

Thanks for this @davidmanzanoai ! I've got some general questions about the approach, more than the technical implementation. If we're trying to have a way for people to install lumigator easily, I think this tool shouldn't clone the repository at all (as it's not needed to run lumigator!) My favored approach here would be to have a script like this one, that pulls the docker-compose & run the start-lumigator command, we probably would like to have a specific docker-compose as well for that one with pre-initiated variables. What are your thoughts?

@agpituk What we can do is to set up the script in a new folder (e.g. install) and we can use the link to the script to be used for installing everything. The default choice will be to take the zip file and use the package from the package repositories instead of building locally (that option will remain accesible through out the Makefile).

Copy link
Contributor

@javiermtorres javiermtorres left a comment

Choose a reason for hiding this comment

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

LGTM. I have tried it on WSL and it works. I'd propose enhancing this to just retrieve the docker compose files and let it download the necessary images from the image repos.

@agpituk
Copy link
Contributor

agpituk commented Jan 10, 2025

Thanks for this @davidmanzanoai ! I've got some general questions about the approach, more than the technical implementation. If we're trying to have a way for people to install lumigator easily, I think this tool shouldn't clone the repository at all (as it's not needed to run lumigator!) My favored approach here would be to have a script like this one, that pulls the docker-compose & run the start-lumigator command, we probably would like to have a specific docker-compose as well for that one with pre-initiated variables. What are your thoughts?

@agpituk What we can do is to set up the script in a new folder (e.g. install) and we can use the link to the script to be used for installing everything. The default choice will be to take the zip file and use the package from the package repositories instead of building locally (that option will remain accesible through out the Makefile).

Ok, happy with that path. We'd need to update the docs as well

@github-actions github-actions bot added documentation Improvements or additions to documentation sdk backend gha GitHub actions related frontend api Changes which impact API/presentation layer schemas Changes to schemas (which may be public facing) labels Jan 16, 2025
@davidmanzanoai
Copy link
Contributor Author

@agpituk @javiermtorres @ividal Could you please take a look. In OS X, if docker isn't installed, it stoped and points the user to a manual installation. Otherwise it sets up everything for the user and start the browser. We might add the file into a folder if you prefer

# Download based on method

echo "Downloading ZIP file..."
curl -L "${REPO_URL}/archive/main.zip" -o lumigator.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be a release link at some point. Maybe just after MVP, when we do have a tag and a release.

start-lumigator.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@javiermtorres javiermtorres left a comment

Choose a reason for hiding this comment

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

I didn't check it this time, but left some comments. Just check that it really works :)

David Manzano and others added 3 commits January 17, 2025 18:59
Co-authored-by: Kostis <[email protected]>
Signed-off-by: David Manzano Macho <[email protected]>
Co-authored-by: Kostis <[email protected]>
Signed-off-by: David Manzano Macho <[email protected]>
Copy link
Contributor

@ividal ividal left a comment

Choose a reason for hiding this comment

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

Pretty handy and worked well on both OS and Ubuntu, except for the docker-compose detection which did not find it on either.

if ! command -v docker &> /dev/null
then
echo "Docker not found. Installing Docker..."
sudo apt-get update
Copy link
Contributor

Choose a reason for hiding this comment

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

Argh. Needing sudo rights. Many devs at companies will have docker available to them through their IT but very likely not have sudo rights to the machine they're using.

Not necessary to merge, but we could have a top level script that asks/checks and then calls:

  • (optional) one that requires sudo and takes care of pre-requirements like docker.
  • a second one with everything else, which assumes you have docker correctly set up for you.


# Install Docker Compose
install_docker_compose() {
if ! command -v "$BREW_PATH/docker-compose" &> /dev/null
Copy link
Contributor

Choose a reason for hiding this comment

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

Although I did have docker compose installed this still didn't detect it.

@davidmanzanoai davidmanzanoai removed help wanted Extra attention is needed sdk gha GitHub actions related frontend schemas Changes to schemas (which may be public facing) backend api Changes which impact API/presentation layer labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants