Skip to content

Commit

Permalink
Change pulling from HTTPS to SSH in documentation (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi authored Aug 12, 2024
1 parent e0fd3f3 commit 0124bae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 37 deletions.
43 changes: 8 additions & 35 deletions docs/docs/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Instantiating the Template

Please visit [Astraios GitHub] and either

1. clone the repo with `git clone https://github.com/paion-data/astraios.git`, or
1. clone the repo with `git clone git@github.com:paion-data/astraios.git`, or
2. make it a template instantiation with our own webservice name by doing the following:

![Error loading instantiation-1.png](./img/instantiation-1.png)
Expand Down Expand Up @@ -85,57 +85,30 @@ In the end, run `mvn clean install` to install our model
From this point on, we assume [this example data model][astraios-data-models-example] is used

```bash
git clone https://github.com/paion-data/astraios-data-models-example.git
cd astraios-data-models-example.git
git clone git@github.com:paion-data/astraios-data-models-example.git
cd astraios-data-models-example
mvn clean install
```

:::

Loading Data Models
-------------------

So now we have some models, but without an API it is not very useful. Now we need to instruct our _my-webservice_ to
load [data models](#creating-models) via Maven config file, i.e. **~/.m2/settings.xml**:

```xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<profiles>
<profile>
<id>astraios-data-models</id>
<properties>
<model.package.jar.group.id>com.paiondata</model.package.jar.group.id>
<model.package.jar.artifact.id>astraios-data-models-example</model.package.jar.artifact.id>
<model.package.jar.version>1.0.0</model.package.jar.version>
</properties>
</profile>
</profiles>

<activeProfiles>
<activeProfile>astraios-data-models</activeProfile>
</activeProfiles>
</settings>
```

Running
-------

With data models defined, can run _my-webservice_

```bash
cd my-webservice
mvn clean package
mvn clean package --settings settings.xml.example
MODEL_PACKAGE_NAME=com.paiondata.astraios.data.models docker compose up --build --force-recreate
```

:::info

`com.paiondata.astraios.data.models` is the name of the model in the aforementioned
[data model project][astraios-data-models-example]
- `com.paiondata.astraios.data.models` is the name of the model in the aforementioned
[data model project][astraios-data-models-example]
- The data model is loaded via a special-purpose Maven settings file called `settings.xml.example`, which instructs
_my-webservice_ to load [data models](#creating-models). It's essentially the regular __~/.m2/settings.xml__:

:::

Expand Down
4 changes: 2 additions & 2 deletions settings.xml.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<profiles>
<profile>
<id>astraios-data-models-properties</id>
<id>astraios-data-models</id>
<properties>
<model.package.jar.group.id>com.paiondata</model.package.jar.group.id>
<model.package.jar.artifact.id>astraios-data-models-example</model.package.jar.artifact.id>
Expand All @@ -15,6 +15,6 @@
</profiles>

<activeProfiles>
<activeProfile>astraios-data-models-properties</activeProfile>
<activeProfile>astraios-data-models</activeProfile>
</activeProfiles>
</settings>

0 comments on commit 0124bae

Please sign in to comment.