Tutorial Part 0: Getting Started
Set up your project and run rescile-ce to create your first blueprint.
Part 0: Getting Started - Your First Blueprint
Goal: In this first part of the tutorial, we will set up the project, run rescile-ce for the first time, and understand the basic workflow of making a change and seeing the result.
Before You Begin
To follow this tutorial, you need the rescile-ce binary installed and accessible in your system's PATH. You can verify the installation by running rescile-ce --version. You will also need a project directory to hold your configuration files.
Step 0: The Lay of the Land
First, let’s create a project folder for our tutorial and set up the standard directory structure that rescile expects.
mkdir -p rescile-tutorial/data/{assets,models,compliance,output}
cd rescile-tutorial
This structure is the foundation of every rescile project:
data/assets/: This is where your “ground truth” data lives. These are typically simple CSV files describing your raw assets like applications, databases, or servers.data/models/: This directory holds your architectural rules, written in TOML. These models transform the raw assets into a rich, connected graph, deriving new resources and relationships.data/compliance/: This is where you define your “Compliance as Code” policies, also in TOML. These rules are applied after the main graph is built to enforce security, governance, and regulatory requirements.data/output/: This directory holds TOML definitions for generating structured data output (e.g., JSON summaries) from your completed graph.
Running rescile-ce serve
The core command you will use throughout this tutorial is rescile-ce serve. This powerful command performs two key actions:
- It runs the
rescileimporter, reading all the files in yourdatadirectory to build the complete graph in memory. - It starts a local GraphQL server, allowing you to query and explore the graph you’ve just built.
Let’s run it now with our empty data directory.
rescile-ce serve
You should see output indicating that the server has started, typically on localhost:7600.
...
Starting import process from data directory: "./data"
rescile: Starting graph build process...
Loaded 0 asset files.
Loaded 0 architectural model definitions.
Loaded 0 compliance file definitions.
Loaded 0 output file definitions.
▶ Phase 1: Loading Assets & Creating Resources & Relationships
✓ Phase 1: Resources and Relationships Applied (0 files, +0 resources, +0 defined relations, +0 auto relations, +0 properties set)
▶ Phase 2: Applying Architectural Models & Relationships
✓ Phase 2: Models & Relationships Applied (0 files, +0 resources, +0 defined relations, +0 auto relations, +0 properties set)
▶ Phase 3: Applying Compliance Rules
✓ Phase 3: Compliance Rules Applied (0 files, +0 resources, +0 relations, 0 enriched, +0 properties set)
▶ Phase 4: Applying Output Definitions
✓ Phase 4: Outputs Applied (0 files, +0 resources, +0 relations, +0 properties set)
▶ Phase 5: Finalizing Graph & Writing Output
▶ Fetching data types and descriptions...
✓ Phase 5: Finalization & Output Complete (0 types)
✓ Finished successfully. No orphaned assets found.
✓ Final graph contains 0 vertices and 0 edges.
Fetching data types and descriptions from in-memory graph...
✓ Finished fetching data types. Found 0 types.
✓ GraphQL schema created.
✓ GraphiQL UI enabled at http://127.0.0.1:7600
...
Result: Open your web browser and navigate to http://localhost:7600. You will see the GraphiQL interface, an interactive UI for writing and executing GraphQL queries. Since we started with an empty data directory, the graph is empty, but this confirms our environment is set up correctly. This UI will be our primary tool for verifying our changes at each step.
An Alternative: Visualizing with convert
While the GraphiQL UI is great for querying, sometimes a visual representation is more intuitive. The rescile-ce convert command builds the graph just like serve, but instead of starting a server, it exports the graph to a file.
Let’s try it. Make sure to stop the serve command (with Ctrl+C) first, then run:
rescile-ce convert -o graph.graphml
This creates a graph.graphml file in your project directory. This is a standard format that can be opened with graph visualization tools like yEd Live or Gephi. If you open the file now, you’ll see a blank canvas, which is expected.
With our project set up and our verification tools in hand, we’re ready to start building our blueprint.