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

Updated tutorial to reflect github repo #51

Merged
merged 1 commit into from
Oct 10, 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
42 changes: 22 additions & 20 deletions docs/modules/guides/pages/apis-db-kafka.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ If you run `docker ps`, you should see a collection of Docker containers now run
| {short-product-name}
| The core {short-product-name} server, which provides our UI, and runs all our integration for us

| management-center
| {short-product-name}
| The Management Center, for monitoring and managing {short-product-name}

| films-api
| Demo
| A REST API, which exposes information about films. We also publish a Protobuf message to Kafka from here
Expand All @@ -78,33 +82,29 @@ If you run `docker ps`, you should see a collection of Docker containers now run
* xref:deploying:production-deployments.adoc[Deploying {short-product-name} without the demo projects]
* https://github.com/hazelcast/hazelcast-flow-public-demos/tree/main/films-demo[Demo project source code, on GitHub]

== Create a project
First, we'll create a project for {short-product-name} to hold the connection details of our data sources, and schemas.
== View the project
An empty project named *films* has been created for {short-product-name} to hold the connection details of our data sources, and schemas.
The project is a https://taxilang.org[Taxi] project which gets edited locally, then checked into Git once you're ready to go to production.

- From the sidebar, click http://localhost:9021/projects[Projects]
- Click *Add Project* and add a Local Disk project
- For the **Project Path**, enter `demo`
- The server will tell you it can't find an existing project, and let you create one - click **Create new project**
- Enter the package co-ordinates as follows (this is similar to npm, maven, etc.)

- You will see the films project listed
- Click on the project to view the details


|===
| Field | Value

| *Organisation*
| `com.hazelflix`

| *Name*
| `demo`

| *Version*
| `1.0.0`
| `0.1.0`
|===

- Click *Create*
As we progress through this tutorial, we'll be adding connections to our database, REST API and Kafka topic to this project. You can view the taxi schemas that {short-product-name} generates in this project.


A new, empty Taxi project is created, and you'll be taken to the Project list.

== Connect a database table

Expand All @@ -122,7 +122,7 @@ To get started, click on *Data sources* on the side bar, and click *Add a data s

First, we need to tell {short-product-name} how to connect to the database.

* From the project drop-down, select the "Demo" project we just created
* From the project drop-down, select the "films" project
* Select *Database Table* as the data source to add
* For Connection, select *Add a new connection...*
* A pop-up window appears, allowing you to create a connection to our database
Expand Down Expand Up @@ -188,7 +188,7 @@ To import the schema:
| `film`

| Default namespace
| `com.hazelflix.demo.filmsdatabase`
| `com.hazelflix.films.filmsdatabase`
|===

Namespaces are used to help us group related content together, like packages in Java or namespaces in C# and Typescript.
Expand Down Expand Up @@ -221,12 +221,11 @@ be created. For now, the defaults that have been assigned are good enough.

{short-product-name} will create the necessary schema files in a local project.

{short-product-name} also creates a series of https://taxilang.org[Taxi] schema files that contain the schemas we've just imported. You can explore these files locally. If you named your project `demo`, all the project
files are in a directory called `demo` next to where you launched {short-product-name} from.
{short-product-name} also creates a series of https://taxilang.org[Taxi] schema files that contain the schemas we've just imported. You can explore these files locally. You will find them in the 'taxi/src' directory.


----
cd demo/
cd taxi/
----

Taxi ships a great https://marketplace.visualstudio.com/items?itemName=taxi-lang.taxi-language-server[VS Code plugin] which provides click-to-navigate, syntax highlighting, autocompletion and more.
Expand All @@ -248,7 +247,7 @@ We'll use the UI of {short-product-name} to import a Swagger definition of our R
* Click *Data Sources* on the sidebar
* Once again, click *Add a data source*
* Alternatively, navigate to http://localhost:9021/data-source-manager/add
* Select the demo project as the target project
* Select the films project as the target project
* From the drop-down list, select *Swagger / Open API* as the type of schema to import
* For the Swagger Source, select a URL

Expand Down Expand Up @@ -665,9 +664,12 @@ has generated during this tutorial.
| `workspace.conf`
| The config file that lists all the projects - including the one we created. It defines where to read and write the schema files {short-product-name} created in the background.

| `demo/`
| `taxi/`
| The schema project that {short-product-name} was writing schemas to

| `demo/orbital/connections.conf`
| `taxi/config/connections.conf`
| A connections file defining the database and Kafka connections you imported in the UI.

| `taxi/src/`
| The Taxi schemas that {short-product-name} generated for you. These are the schemas that describe the data you've been working with.
|===
4 changes: 2 additions & 2 deletions docs/modules/guides/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ amazing integration projects.
== Quick Links

* xref:deploying:development-deployments.adoc[Development Quickstart] - Start here
* xref:apis-db-kafka.adoc[Connect APIs, a database and Kafka] - Deploy {spn} locally, then integrate a database, a REST API, and Kafka. Ideal for beginners
* xref:compose.adoc[Compose APIs and a Database] - Exposing a Backend for Frontend (BFF) that links data between a database and several APIs
* xref:apis-db-kafka.adoc[Connect APIs, a database and Kafka] - Deploy {spn} locally, then integrate a database, a REST API, and Kafka. Ideal for beginners
//* xref:compose.adoc[Compose APIs and a Database] - Exposing a Backend for Frontend (BFF) that links data between a database and several APIs
* xref:work-with-xml.adoc[Work with XML and JSON] - Combine data from XML and JSON data sources
* xref:streaming-data.adoc[Stream data] - Join and enrich Kafka streams to deliver bespoke data feeds
* xref:gen-taxi-from-code.adoc[Generate Taxi from code] - Generate Taxi schemas directly from your application code
Loading