Skip to content

Commit

Permalink
Merge pull request #91 from pef-ericsson/issue-90
Browse files Browse the repository at this point in the history
Fix syntax errors in components configurations and improve docs. (#90)
  • Loading branch information
e-backmark-ericsson authored Jul 5, 2024
2 parents cd1414c + e36799b commit 9ac944a
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 6 deletions.
8 changes: 4 additions & 4 deletions bundles/Eiffel/components-configuration.bash
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export DOCKER_CONFIG_EIFFEL_DUMMY_ER="$CONFIG_EIFFEL_DUMMY_ER"
### Eiffel-ER service ###

export CONFIG_EIFFEL_ER="
server.servlet.context-path=
server.servlet.contextpath=
server.port=${EIFFEL_ER_INTERNAL_PORT}
rabbitmq.host=${EIFFEL_RABBITMQ}
rabbitmq.port=${EIFFEL_RABBITMQ_AMQP_APPLICATION_PORT}
Expand Down Expand Up @@ -456,7 +456,7 @@ export K8S_ENV_CONFIG_EIFFEL_ER="WAIT_HOSTS: '$EIFFEL_RABBITMQ\:${EIFFEL_RABBITM

# Docker format
export DOCKER_CONFIG_EIFFEL_ER="$CONFIG_EIFFEL_ER
WAIT_HOSTS=$EIFFEL_RABBITMQ:${EIFFEL_RABBITMQ_WEB_APPLICATION_PORT} $EIFFEL_MONGODB:${EIFFEL_MONGODB_APPLICATION_PORT}"
WAIT_HOSTS=\"$EIFFEL_RABBITMQ:${EIFFEL_RABBITMQ_WEB_APPLICATION_PORT} $EIFFEL_MONGODB:${EIFFEL_MONGODB_APPLICATION_PORT}\""

### End of Eiffel-ER service ###

Expand Down Expand Up @@ -508,8 +508,8 @@ activedirectory.managerPassword=
activedirectory.managerDn=
activedirectory.rootDn=
activedirectory.userSearchFilter=
event-repository.enabled=true
event-repository.url=${EIFFEL_ER_REST_URL}
event.repository.enabled=true
event.repository.url=${EIFFEL_ER_REST_URL}
logging.level.root=ERROR
logging.level.org.springframework.web=DEBUG
logging.level.com.ericsson.eiffel.remrem.producer=DEBUG"
Expand Down
106 changes: 104 additions & 2 deletions wiki/eiffel/tutorial.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!---
Copyright 2020 Ericsson AB.
Copyright 2024 Ericsson AB.
For a full list of individual contributors, please see the commit history.
Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -15,4 +15,106 @@
limitations under the License.
--->
# Tutorial for Eiffel Bundle
To be defined

In the following tutorial, you will go through:

1. Deploy Eiffel bundle using Docker.
1. Check the existing subscriptions.
1. Publish an Eiffel event which triggers a few Jenkins jobs.

## Prerequisites

1. You have installed and you have set up **Docker**.
1. You have cloned [eiffel-easy2use](https://github.com/eiffel-community/eiffel-easy2use.git) repository locally.

**_NOTE:_** Eiffel bundle requires **12GB** RAM usage, approximately.

## Start Eiffel Bundle Using Docker

1. Change directory to *eiffel-easy2use*, for example:
```console
cd eiffel-easy2use
```

1. Start Eiffel by executing the command:
```console
./easy2use start Eiffel -t Docker -e bundles/ -y
```

1. Wait until all Docker containers are up and running.
Check it by executing the command:
```console
docker ps
```

## Get the Existing Subscriptions from EI

There are two ways that you can check the existing subscriptions:

1. Execute the following **curl** command:
```console
curl -X GET -H "Content-type: application/json" "http://localhost:8077/subscriptions"
```

1. Navigate to **localhost:8077** on your browser and check the subscriptions in the GUI.

## Publish an Eiffel ArtC Event and Trigger the Jenkins Jobs

There are two ways that you can publish an Eiffel event:

1. Execute the following **curl** command:
```console
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
"meta": {
"type": "EiffelArtifactCreatedEvent",
"version": "3.0.0",
"time": 1234567890,
"id": "77a7f4e7-9847-44a6-9bf0-3a19a9528ccd",
"source": {
"serializer": "pkg:maven/com.mycompany.tools/eiffel-serializer%401.0.3"
}
},
"data": {
"identity": "pkg:maven/com.othercompany.library/required@required"
}
}' "http://localhost:8096/producer/msg?mp=eiffelsemantics"
```

1. Navigate to **localhost:8096** on your browser and publish an
Eiffel event via the *Swagger* interface.

Then,

1. Navigate to *Jenkins* or *Jenkins FEM* GUI, **localhost:8051** or **localhost:8052** correspondingly
and check that some jobs have **SUCESS** status.

1. Navigate to **localhost:8084** on your browswer and press the link *"List all events in ER (result will be paginated)"*
to view all the Eiffel events that have been created.

## Next Steps

After you have finished the tutorial successfuly, you can experiment with the Eiffel.

For example, you can add a new subscription and publish the corresponding Eiffel event
that triggers an existing Jenkins job or a new Jenkins job.

## Troubleshooting

1. Limited RAM space can restart frequently a Docker container due to memory allocation error.
In this case, check the RAM usage by executing the command:

```console
free -h
```

1. Check the Docker container logs by executing the command:

```console
docker logs <container_id>
```

If there is an error, you can try to restart the container:

```console
docker restart <container_id>
```

0 comments on commit 9ac944a

Please sign in to comment.