diff --git a/.gitignore b/.gitignore index 31698e7c..df6cd897 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ *.log.* *.pyc .ipynb_* -examon-cache/ -examon-cache/* +examon-cache build site diff --git a/Dockerfile b/Dockerfile index 3c8c8d63..e9e41253 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,52 +1,35 @@ -FROM examonhpc/examon:0.2.0 +FROM examonhpc/examon:0.3.2 ENV EXAMON_HOME /etc/examon_deploy/examon -# Create a backup of the existing sources.list -RUN mv /etc/apt/sources.list /etc/apt/sources.list.backup - -# Create a new sources.list file -RUN touch /etc/apt/sources.list - -# Debian strech moved to archived -RUN echo "deb https://debian.mirror.garr.it/debian-archive/ stretch main" > /etc/apt/sources.list - - -# Install dependencies -RUN apt-get update && apt-get install -y \ - apt-transport-https \ - ca-certificates \ - libffi-dev \ - build-essential \ - libssl-dev \ - python-dev \ - && rm -rf /var/lib/apt/lists/* - -# copy app +# Copy app ADD ./publishers/random_pub ${EXAMON_HOME}/publishers/random_pub -ADD ./lib/examon-common $EXAMON_HOME/lib/examon-common ADD ./docker/examon/supervisor.conf /etc/supervisor/conf.d/supervisor.conf ADD ./scripts/examon.conf $EXAMON_HOME/scripts/examon.conf ADD ./web $EXAMON_HOME/web -# install -RUN pip --trusted-host pypi.python.org install --upgrade pip==20.1.1 +# Venvs +WORKDIR $EXAMON_HOME/scripts +RUN virtualenv -p $(which python) py3_env + ENV PIP $EXAMON_HOME/scripts/ve/bin/pip +ENV S_PIP $EXAMON_HOME/scripts/py3_env/bin/pip +# Install WORKDIR $EXAMON_HOME/lib/examon-common -RUN $PIP install . -RUN pip install . +RUN $S_PIP install . +# Random publisher WORKDIR $EXAMON_HOME/publishers/random_pub RUN $PIP install -r requirements.txt +# Web WORKDIR $EXAMON_HOME/web -RUN virtualenv flask -RUN flask/bin/pip --trusted-host pypi.python.org install --upgrade pip==20.1.1 -RUN CASS_DRIVER_BUILD_CONCURRENCY=8 flask/bin/pip --trusted-host pypi.python.org install -r ./examon-server/requirements.txt +RUN virtualenv -p $(which python) flask +RUN CASS_DRIVER_BUILD_CONCURRENCY=8 flask/bin/pip install -r ./examon-server/requirements.txt WORKDIR $EXAMON_HOME/scripts -EXPOSE 1883 9001 +EXPOSE 1883 5000 9001 CMD ["./frontend_ctl.sh", "start"] diff --git a/README.md b/README.md index 69aa7fe2..3948cdd3 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ It can be disabled as described in the [Enable/disable plugins](#enabledisable-t ## Prerequisites Since Cassandra is the component that requires the majority of resources, you can find more details about the suggested hardware configuration of the system that will host the services here: -[Hardware Configuration](https://cassandra.apache.org/doc/latest/operating/hardware.html#:~:text=While%20Cassandra%20can%20be%20made,at%20least%2032GB%20of%20RAM) +[Hardware Configuration](https://cassandra.apache.org/doc/latest/cassandra/managing/operating/hardware.html) To install all the services needed by ExaMon we will use Docker and Docker Compose: diff --git a/VERSION b/VERSION index 1e66a616..01e994d3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.3.1 \ No newline at end of file +v0.4.0 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index b1da1f8b..98fe5c06 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3.8" name: "examon" networks: @@ -11,11 +10,8 @@ services: examon: build: context: . - image: examonhpc/examon:0.2.2 + image: examonhpc/examon:latest volumes: - - type: bind - source: ./lib/examon-common - target: /etc/examon_deploy/examon/lib/examon-common - type: bind source: ./web/examon-server target: /etc/examon_deploy/examon/web/examon-server diff --git a/docker/examon/supervisor.conf b/docker/examon/supervisor.conf index 34a623c9..4efbbe72 100644 --- a/docker/examon/supervisor.conf +++ b/docker/examon/supervisor.conf @@ -23,7 +23,7 @@ startsec=2 [program:random_pub] directory=/etc/examon_deploy/examon/publishers/random_pub -command=python ./random_pub.py run +command=/etc/examon_deploy/examon/scripts/ve/bin/python random_pub.py run autostart=true autorestart=true stderr_logfile=/var/log/random_pub.log diff --git a/docker/kairosdb/Dockerfile b/docker/kairosdb/Dockerfile index 16ab7c67..761753da 100644 --- a/docker/kairosdb/Dockerfile +++ b/docker/kairosdb/Dockerfile @@ -2,15 +2,6 @@ FROM adoptopenjdk:8-jre-hotspot-focal -# Create a backup of the existing sources.list -RUN mv /etc/apt/sources.list /etc/apt/sources.list.backup - -# Create a new sources.list file -RUN touch /etc/apt/sources.list - -# Add the new server repository for focal packages -RUN echo "deb https://ubuntu.mirror.garr.it/ubuntu/ focal main" > /etc/apt/sources.list - RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ diff --git a/docs/Administrators/Getting_started.md b/docs/Administrators/Getting_started.md index 2ac5fa47..cf9aba62 100644 --- a/docs/Administrators/Getting_started.md +++ b/docs/Administrators/Getting_started.md @@ -9,7 +9,7 @@ This setup will install all server-side components of the ExaMon framework: ## Prerequisites Since Cassandra is the component that requires the majority of resources, you can find more details about the suggested hardware configuration of the system that will host the services here: -[Hardware Configuration](https://cassandra.apache.org/doc/latest/operating/hardware.html#:~:text=While%20Cassandra%20can%20be%20made,at%20least%2032GB%20of%20RAM) +[Hardware Configuration](https://cassandra.apache.org/doc/latest/cassandra/managing/operating/hardware.html) To install all the services needed by ExaMon we will use Docker and Docker Compose: diff --git a/docs/Plugins/examon_pub.ipynb b/docs/Plugins/examon_pub.ipynb index 28681d2f..3e0eadca 100644 --- a/docs/Plugins/examon_pub.ipynb +++ b/docs/Plugins/examon_pub.ipynb @@ -6,12 +6,12 @@ "metadata": {}, "source": [ "# Example plugin\n", - "This notebook shows how to create a simple Examon publisher using Python (v3)\n", + "This notebook shows how to create a simple Examon publisher using Python.\n", "\n", "## Install \n", - "Install the publisher library.\n", + "Install the latest Examon publisher library.\n", "\n", - "NOTE: This is a development release so the final API may be different in future versions." + "https://github.com/ExamonHPC/examon-common\n" ] }, { @@ -23,7 +23,7 @@ }, "outputs": [], "source": [ - "! python -m pip install --upgrade https://github.com/fbeneventi/releases/releases/latest/download/examon-common-py3.zip" + "! python -m pip install --upgrade git+https://github.com/ExamonHPC/examon-common.git@master" ] }, { diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 00000000..04800515 --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,88 @@ +# Contributing to ExaMon + +First off, thank you for considering contributing to our project! + +## How Can I Contribute? + +### Reporting Bugs + +Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible: + +* Use a clear and descriptive title +* Describe the exact steps which reproduce the problem +* Provide specific examples to demonstrate the steps +* Describe the behavior you observed after following the steps +* Explain which behavior you expected to see instead and why +* Include screenshots if possible + +### Suggesting Enhancements + +If you have a suggestion for the project, we'd love to hear about it. Please include: + +* A clear and detailed explanation of the feature +* The motivation behind this feature +* Any alternative solutions you've considered +* If applicable, examples from other projects + +### Pull Request Process + +1. Fork the repository and create your branch from `master` +2. If you've added code that should be tested, add tests +3. Ensure the test suite passes +4. Update the documentation if needed +5. Issue that pull request! + +#### Pull Request Guidelines + +* Follow our coding standards (see below) +* Include relevant issue numbers in your PR description +* Update the README.md with details of changes if applicable +* The PR must pass all CI/CD checks [TBD] +* Wait for review from maintainers + +### Development Setup + +1. Fork and clone the repo +3. Create a branch: `git checkout -b my-branch-name` + +### Coding Standards + +* Use consistent code formatting +* Write clear commit messages following [Conventional Commits](https://www.conventionalcommits.org/) or at least the basic specification as in the [Commit Messages](#commit-messages) section. +* Comment your code where necessary +* Write tests for new features +* Keep the code simple and maintainable + +### Commit Messages + +Basic specification example: + +``` +type(scope): description +[optional body] +[optional footer] +``` + +The type should be one of the following: + +| Type | Description | +|------|-------------| +| add | Introduces a new feature or functionality | +| fix | Patches a bug or resolves an issue | +| change | Modifies existing functionality or behavior | +| remove | Deletes or deprecates functionality | +| merge | Combines branches or resolves conflicts | +| doc | Updates documentation or comments | + + +### First Time Contributors + +Looking for work? Check out our issues labeled `good first issue` or `help wanted`. + +## License + +By contributing, you agree that your contributions will be licensed under the same license that covers the project. + +## Questions? + +Don't hesitate to contact the project maintainers if you have any questions! diff --git a/docs/credits.md b/docs/credits.md index d8bf5f66..07758b23 100644 --- a/docs/credits.md +++ b/docs/credits.md @@ -5,5 +5,5 @@ This work is supported by the EU FETHPC projects: - [MULTITHERMAN (g.a. 291125)](https://cordis.europa.eu/project/id/291125) - [ANTAREX (g.a. 671623)](https://antarex.fe.up.pt/) - [IOTWINS (g.a. 857191)](https://www.iotwins.eu/) -- [REGALE (g.a. 956560)](https://regale-project.eu/) +- [REGALE (g.a. 956560)](https://regale-project.eu/) - [The Italian Ministry of Enterprises and Made in Italy ("MIMIT")](https://www.mimit.gov.it/en/) - [GRAPH MASSIVIZER (g.a. 101093202)](https://graph-massivizer.eu/) diff --git a/docs/overrides/home.html b/docs/overrides/home.html index 26c5c391..b3632c4f 100644 --- a/docs/overrides/home.html +++ b/docs/overrides/home.html @@ -317,101 +317,359 @@ .logo-grid { - flex-wrap: wrap; /* Allow flex items to wrap to the next row */ - justify-content: center; /* Center items horizontally within the container */ - } + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: 1rem; + } .logo-grid a { - flex: 1; /* Distribute available space equally among items */ - text-align: center; /* Center the text within each item */ - margin: 10px; /* Add some spacing between items */ - } + flex: 1; + text-align: center; + margin: 10px; + display: flex; + justify-content: center; + align-items: center; + } - /* Add media query using em units for max-width */ - @media screen and (max-width: 76.25em) { + .logo-grid img { + max-width: 100%; + height: auto; + object-fit: contain; + } - .top-hr { - display: grid; - } - /* Change the order of flex items within .second-row */ - .second-row .feature-item:nth-child(1) { - order: 2; /* Change order for the first .feature-item in the second-row */ - } + /* Modern Footer Styles - Material Theme Compatible */ + .modern-footer { + background-color: var(--md-footer-bg-color); + color: var(--md-footer-fg-color); + margin-top: 4rem; + border-top: 1px solid var(--md-default-fg-color--lightest); + } - .second-row .feature-item:nth-child(2) { - order: 1; /* Change order for the second .feature-item in the second-row */ - } + .footer-main { + padding: 3rem 0 2rem; + } - /* Disable Menu drawer: broken in hompage */ - .md-header__button:not([hidden]) { - display: none; - } + .footer-content { + display: grid; + grid-template-columns: 2fr 1fr 1fr 1fr; + gap: 2rem; + max-width: 1200px; + margin: 0 auto; + padding: 0 1rem; + } - .md-sidebar { - display: none; - } - } + .footer-section { + display: flex; + flex-direction: column; + } + .footer-brand { + max-width: 300px; + } - /* footer */ + .footer-logo { + max-height: 60px; + width: auto; + margin-bottom: 1rem; + filter: brightness(0.9); + object-fit: contain; + max-width: 100%; + } - footer { - background-color: #000000de; - color: #fff; - padding: 20px 0; + /* Dark mode logo adjustment */ + [data-md-color-scheme="slate"] .footer-logo { + filter: brightness(1.2); } - .footer-content { - display: flex; - justify-content: space-between; - align-items: center; - max-width: 1200px; - margin: 0 auto; + .footer-description { + color: var(--md-footer-fg-color--light); + line-height: 1.6; + margin-bottom: 1.5rem; + font-size: 0.9rem; + } + + .footer-title { + color: var(--md-footer-fg-color); + font-size: 1.1rem; + font-weight: 600; + margin-bottom: 1rem; + position: relative; + text-align: left; } - .logo-section img { - max-height: 50px; - margin-right: 20px; + .footer-title::after { + content: ''; + position: absolute; + bottom: -0.5rem; + left: 0; + width: 2rem; + height: 2px; + background: var(--md-primary-fg-color); + border-radius: 1px; } - nav ul { + .footer-links { list-style: none; + padding: 0; + margin: 0; + } + + .footer-links li { + margin-bottom: 0.7rem; + } + + .footer-links a { + color: var(--md-footer-fg-color--light); + text-decoration: none; + font-size: 0.9rem; + transition: all 0.3s ease; + position: relative; + } + + .footer-links a:hover { + color: var(--md-footer-fg-color); + padding-left: 0; + } + + .footer-social { display: flex; + gap: 1rem; + margin-top: 1rem; + } + + .social-link { + display: flex; + align-items: center; justify-content: center; - flex-wrap: wrap; /* Allow flex items to wrap to the next row */ + width: 2.5rem; + height: 2.5rem; + /* background: var(--md-default-fg-color--lightest); */ + background: var(--md-footer-fg-color--light); + border-radius: 50%; + color: var(--md-footer-fg-color--lighter); + text-decoration: none; + transition: all 0.3s ease; + flex-shrink: 0; } - nav li { - margin: 0 10px; + .social-link .twemoji { + width: 1.2rem; + height: 1.2rem; + color: var(--md-footer-fg-color--lighter); + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + } + + .social-link .twemoji svg { + width: 100%; + height: 100%; + object-fit: contain; + } + + .social-link:hover { + background: var(--md-primary-fg-color); + color: var(--md-primary-bg-color); + transform: translateY(-2px); + box-shadow: 0 4px 12px var(--md-shadow-z2); + } + + .social-link:hover .twemoji { + color: var(--md-primary-bg-color); } - nav a { + .footer-bottom { + background: var(--md-default-bg-color--lighter); + border-top: 1px solid var(--md-default-fg-color--lightest); + padding: 1.5rem 0; + } + + /* Dark mode footer bottom adjustment */ + [data-md-color-scheme="slate"] .footer-bottom { + background: var(--md-default-bg-color--light); + } + + .footer-bottom-content { + display: flex; + justify-content: space-between; + align-items: center; + max-width: 1200px; + margin: 0 auto; + padding: 0 1rem; + } + + .footer-copyright p { + margin: 0.2rem 0; color: var(--md-footer-fg-color--lighter); + font-size: 0.85rem; + } + + .footer-copyright a { + color: var(--md-footer-fg-color--light); text-decoration: none; - font-size: 0.8rem; - transition: all 0.3s ease-in-out; + transition: color 0.3s ease; } - nav a:hover { - color: #0088cc; + .footer-copyright a:hover { + color: var(--md-footer-fg-color); } - .social-media { + .footer-legal { display: flex; + align-items: center; + gap: 0.5rem; + } + + .footer-legal a { + color: var(--md-footer-fg-color--lighter); + text-decoration: none; + font-size: 0.85rem; + transition: color 0.3s ease; } - .social-icon { - color: #fff; - font-size: 1.5rem; - margin-right: 10px; - transition: all 0.3s ease-in-out; + .footer-legal a:hover { + color: var(--md-footer-fg-color); } - .social-icon:hover { - color: #0088cc; + .separator { + color: var(--md-footer-fg-color--lightest); + font-size: 0.85rem; } + /* --- Responsive Design --- */ + @media screen and (max-width: 1024px) { + /* -- Tablet and Mobile -- */ + + /* Hide navigation */ + .md-sidebar--primary { + display: none; + } + + .top-hr { + display: flex; + flex-direction: column; + gap: 2rem; + margin-right: auto; + margin-left: auto; + padding: 0 .2rem; + max-width: 61rem; + } + + .second-row .feature-item:nth-child(1) { order: 2; } + .second-row .feature-item:nth-child(2) { order: 1; } + + .top-hr .feature-item { + margin-bottom: 1.5rem; + text-align: center; + } + + .feature-item img { + max-width: 100%; + height: auto; + object-fit: contain; + max-height: 400px; + } + + .logo-grid { + display: flex; + flex-direction: column; + gap: 2rem; + width: 100%; + } + + .logo-grid a { + flex: none; + margin: 0; + width: 60%; + max-width: 250px; + } + + .logo-grid img { + width: 100%; + max-height: 160px; + height: auto; + } + + .footer-content { + grid-template-columns: 1fr 1fr; + } + + .footer-brand { + grid-column: 1 / -1; + max-width: 100%; + display: flex; + flex-direction: column; + align-items: center; + } + + .footer-brand .footer-title { + text-align: center; + } + + .footer-brand .footer-title::after { + left: 50%; + transform: translateX(-50%); + } + } + + @media screen and (max-width: 768px) { + /* -- Mobile Only -- */ + + .top-hr { + display: grid; + } + + .footer-content { + grid-template-columns: 1fr; + } + + .footer-section { + text-align: center; + } + + .footer-title { + text-align: center; + } + + .footer-title::after { + left: 50%; + transform: translateX(-50%); + } + + .footer-brand { + text-align: center; + } + + .footer-logo { + max-height: 50px; + } + + .footer-bottom-content { + flex-direction: column; + gap: 1rem; + text-align: center; + } + + .footer-social { + justify-content: center; + flex-wrap: wrap; + } + + .logo-grid a { + width: 80%; + max-width: 300px; + } + + .md-header__button:not([hidden]) { + display: none; + } + .md-sidebar { + display: none; + } + } @@ -577,11 +835,6 @@