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

Update run profiles #160

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build

# IntelliJ
.idea/*
.run/*
!.idea/vcs.xml
*.iml
*.iws
Expand Down
17 changes: 17 additions & 0 deletions .run/Dev, start pulsar and zk.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Dev, start pulsar and zk" type="docker-deploy" factoryName="docker-compose.yml" server-name="Docker">
<deployment type="docker-compose.yml">
<settings>
<option name="envFilePath" value="" />
<option name="profiles">
<list>
<option value="dev" />
</list>
</option>
<option name="removeOrphansOnComposeDown" value="false" />
<option name="sourceFilePath" value="setup/docker/compose.yml" />
</settings>
</deployment>
<method v="2" />
</configuration>
</component>
24 changes: 24 additions & 0 deletions .run/varadhi [build].run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="varadhi [build]" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="build" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
25 changes: 25 additions & 0 deletions .run/varadhi local [run].run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="varadhi local [run]" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
kmrdhruv marked this conversation as resolved.
Show resolved Hide resolved
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="run" />
<option value="--args=&quot;src/main/resources/configuration.yml&quot;" />
</list>
</option>
<option name="vmOptions" value="-Dvertx.disableDnsResolver=true -Dlog4j2.configurationFile=src/main/resources/log4j2.xml" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,36 @@ 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/)
is used as global datastore to persist json formatted entities. For the development environment, containerised Zookeeper
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

Expand Down
Loading