From dd1e6737b33b2cdb891c90af79b690ae26cd809e Mon Sep 17 00:00:00 2001 From: iosdev747 Date: Tue, 6 Aug 2024 09:12:22 +0530 Subject: [PATCH 1/2] add run profiles --- .gitignore | 1 + .run/Dev, start pulsar and zk.run.xml | 17 +++++++++++++++++ .run/varadhi [build].run.xml | 24 ++++++++++++++++++++++++ .run/varadhi local [run].run.xml | 25 +++++++++++++++++++++++++ README.md | 18 +++++++++++++----- 5 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 .run/Dev, start pulsar and zk.run.xml create mode 100644 .run/varadhi [build].run.xml create mode 100644 .run/varadhi local [run].run.xml diff --git a/.gitignore b/.gitignore index 6805eabf..f9386d77 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ build # IntelliJ .idea/* +.run/* !.idea/vcs.xml *.iml *.iws diff --git a/.run/Dev, start pulsar and zk.run.xml b/.run/Dev, start pulsar and zk.run.xml new file mode 100644 index 00000000..24521b04 --- /dev/null +++ b/.run/Dev, start pulsar and zk.run.xml @@ -0,0 +1,17 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.run/varadhi [build].run.xml b/.run/varadhi [build].run.xml new file mode 100644 index 00000000..852dc9b8 --- /dev/null +++ b/.run/varadhi [build].run.xml @@ -0,0 +1,24 @@ + + + + + + + true + true + false + false + + + \ No newline at end of file diff --git a/.run/varadhi local [run].run.xml b/.run/varadhi local [run].run.xml new file mode 100644 index 00000000..161743d5 --- /dev/null +++ b/.run/varadhi local [run].run.xml @@ -0,0 +1,25 @@ + + + + + + + true + true + false + false + + + \ No newline at end of file diff --git a/README.md b/README.md index cc8a2199..480a1cf0 100644 --- a/README.md +++ b/README.md @@ -31,14 +31,20 @@ spec and other detailed information. To provide the required functionality Varadhi takes a dependencies on various tech stack. Current development environment supports below option for these. +Run the following to start the below dependencies. + +```docker compose -f setup/docker/compose.yml -p docker --profile dev up -d``` + +OR + +Start [Dev, start pulsar and zk](.run%2FDev%2C%20start%20pulsar%20and%20zk.run.xml) IntelliJ run profile. + #### Message Broker Varadhi needs a message broker for message persistence and delivery. [Apache Pulsar](https://pulsar.apache.org/) is used as underlying message broker. For the development environment users can use containerised Pulsar in a standalone mode. Details can be found [here](https://pulsar.apache.org/docs/3.0.x/standalone-docker/). -```docker run -it -p 6650:6650 -p 8081:8080 --mount source=pulsardata,target=/pulsar/data --mount source=pulsarconf,target=/pulsar/conf apachepulsar/pulsar:3.0.0 bin/pulsar standalone``` - #### Persistent Store For storing metadata about various Varadhi entities, a datastore is needed. [Zookeeper](https://zookeeper.apache.org/) @@ -46,13 +52,15 @@ is used as global datastore to persist json formatted entities. For the developm can be used in a standalone mode. Details can be found [here](https://hub.docker.com/_/zookeeper). -```docker run --name some-zookeeper --restart always -d -p 2181:2181 -p 2888:2888 -p 3888:3888 -p 8082:8080 zookeeper``` - ### Varadhi Server To run the Varadhi server execute below from repo root. -```./gradlew run --args="src/main/resources/configuration.yml"``` +```./gradlew run --args="src/main/resources/configuration.yml``` + +OR + +Start [varadhi local \[run\]](.run%2Fvaradhi%20local%20%5Brun%5D.run.xml) IntelliJ run profile. ## Modules From c8f9fa1ffee45701f72ce3ad57cdb62a649d085a Mon Sep 17 00:00:00 2001 From: iosdev747 Date: Tue, 13 Aug 2024 19:57:23 +0530 Subject: [PATCH 2/2] update jvm args for local run profile --- .run/varadhi local [run].run.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.run/varadhi local [run].run.xml b/.run/varadhi local [run].run.xml index 161743d5..6ae2c0ec 100644 --- a/.run/varadhi local [run].run.xml +++ b/.run/varadhi local [run].run.xml @@ -14,7 +14,7 @@ -