Skip to content

Commit

Permalink
Merge pull request #531 from telefonicaid/remove-rpm-stuff
Browse files Browse the repository at this point in the history
REMOVE rpm stuff
  • Loading branch information
AlvaroVega authored Nov 20, 2023
2 parents ab6f417 + e52c6db commit f6ea27d
Show file tree
Hide file tree
Showing 13 changed files with 210 additions and 1,120 deletions.
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Remove: RPM stuff
555 changes: 203 additions & 352 deletions rpm/SPECS/pepProxy.spec → Changelog

Large diffs are not rendered by default.

43 changes: 5 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ Three other documents provide further information about the PEP Proxy:

## <a name="deployment"/> Deployment
### Dependencies
The PEP Proxy is standard Node.js app and doesn't require more dependencies than the Node.js interpreter (0.10 or higher) and the NPM package utility. For RPM installations using Yum, those dependencies should be automatically installed.
The PEP Proxy is standard Node.js app and doesn't require more dependencies than the Node.js interpreter and the NPM package utility.

### Without RPM Packages
Just checkout this directory and install the Node.js dependencies using:

```
Expand All @@ -56,26 +55,6 @@ npm install --production

The proxy should be then ready to be configured and used.

### With RPM Packages
This project provides the specs to create the RPM Package for the project, that may (in the future) be installed in a package repository.

To generate the RPM, checkout the project to a machine with the RPM Build Tools installed, and, from the `rpm/` folder,
execute the following command:

```
./create-rpm.sh <release-number> <release-version>
```

This command will generate some folders, including one called RPMS, holding the RPM created for every architecture (noarch is currently generated).

In order to install the generated RPM from the local file, use the following command (changing the PEP RPM for the one you have just generated; X.Y.Z being the version you are about to install):

```
yum --nogpgcheck localinstall pep-proxy-X.Y-Z.noarch.rpm
```

It should automatically download all the dependencies provided they are available (Node.js and NPM may require the EPEL repositories to be added).

### With Docker
There are automatic builds of the development version of the Steelskin PEP Proxy published in Docker hub. In order to install
using the docker version, just execute the following:
Expand Down Expand Up @@ -129,22 +108,10 @@ docker run --name pep -e INSPECT_ENABLED=true -d fiware/fiware-pep-steelskin
Use of node inspection is **disabled** by default.

### Undeployment
In order to undeploy the proxy:
* If it was installed directly from the GIT repositories, just kill the process and remove the directory.
* If it was installed using the RPM, use standard YUM commands to remove it:

```
yum remove pep-proxy
```

### Configuration with an RPM package
If the PEP Proxy is deployed in a machine with an installed Context Broker service, the PEP Proxy will automatically change the Context Broker port to the 10026 and install itself on the port where the Context Broker was listening, so no further configuration should be needed for the connectivity.

During the uninstallation of the PEP Proxy, this process is reversed, to revert the Broker to its original state.
If there is no previous Context Broker instance, the default behaviour of the PEP Proxy is to listen in the port 1026 and redirect its requests to the port 10026 in the local host. This behaviour can be changed configuring the attributes PROXY_PORT and TARGET_PORT in the configuration file.
In order to undeploy the proxy, if it was installed directly from the GIT repositories, just kill the process and remove the directory.

### Configuration without an RPM package
If the PEP Proxy is deployed directly from the source code, it won't add itself as a service, and the running ports should be configured manually. This configuration will involve two steps:
### Configuration
Assuming the PEP Proxy is deployed directly from the source code, it won't add itself as a service, and the running ports should be configured manually. This configuration will involve two steps:
* Changing the port of the Context Broker to a different internal port (not open to external connections). Refer to the Orion Context Broker Deployment Manual for instructions on how to do it.
* Changing the port of the proxy to listen in the Context Broker original port, and to redirect to the new one. This parameters can be changed in the config.js file in the root folder.
Once configured, the service can be started as a demon with the following comand:
Expand Down Expand Up @@ -567,7 +534,7 @@ If SSL Termination is not available, the PEP Proxy can be configured to listen H
### Multi-instance configuration
PEP Proxy is able to start multiple instances by adding and configuring certain files in `/etc/pepProxy.d` and using `pepProxy` service script
In order to start multiple instances of the proxy, just add one configuration file per instance in the `/etc/pepProxy.d` folder. RPM comes with one preconfigured instance (config file called pepproxy_default.conf) that can be used as a template to configure another instances.
In order to start multiple instances of the proxy, just add one configuration file per instance in the `/etc/pepProxy.d` folder.
In its starting sequence, the `pepProxy` service looks for files in `/etc/pepProxy.d` that begins with `pepproxy_` prefix and has `.conf` extension and start (or stop or status or restat) one process for file found.
Expand Down
2 changes: 1 addition & 1 deletion operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The following sections list all the critical errors that may completely stop the
### Validation errors
#### VALIDATION-FATAL-001 Validation Request templates not found
Indicates that the XACML templates used to generate the validation requests are not present, so no interaction with the validation system will be possible. This is a critical error and must be fixed before the system starts working.
Considering the templates come packaged inside the RPM, the problem is most likely to be an installation problem. Check the contents of the RPM are all unpackaged, specifically the directory /opt/pepProxy/lib/templates.
Considering the templates come packaged inside the Docker container, the problem is most likely to be an installation problem. Check the contents of the Docker container are all unpackaged, specifically the directory /opt/pepProxy/lib/templates.

#### PROXY-FATAL-001 Configured to die upon error in a redirection. Stopping process.
Indicates that the PEP Proxy was configured to die upon error in a redirection, and that redirection did occurr, so the PEP
Expand Down
22 changes: 0 additions & 22 deletions rpm/SOURCES/etc/cron.d/cron-logrotate-pepproxy-size

This file was deleted.

242 changes: 0 additions & 242 deletions rpm/SOURCES/etc/init.d/pepProxy

This file was deleted.

29 changes: 0 additions & 29 deletions rpm/SOURCES/etc/logrotate.d/logrotate-pepproxy.conf

This file was deleted.

Loading

0 comments on commit f6ea27d

Please sign in to comment.