Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ This repository contains example code used at the SReXperts conferences.

Please read the license file [here](./LICENSE)

Looking for the Hackathon? find it [here](https://hackathon.srexperts.net)
Looking for the SReXplore event? find it [here](https://srexplore.srexperts.net)
20 changes: 10 additions & 10 deletions clab/srx.clab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ topology:
vRR:
kind: nokia_srlinux
license: /opt/srexperts/license-srlinux24.txt
type: ixrx1b
type: ixr-x1b
mgmt-ipv4: 10.128.${INSTANCE_ID}.13
startup-config: configs/srl/vRR.cfg
ports:
Expand Down Expand Up @@ -336,7 +336,7 @@ topology:
# DC1
spine11:
kind: nokia_srlinux
type: ixrh2
type: ixr-h2
group: spine
mgmt-ipv4: 10.128.${INSTANCE_ID}.31
startup-config: configs/srl/__clabNodeName__.cfg
Expand All @@ -351,7 +351,7 @@ topology:
graph-level: "1"
spine12:
kind: nokia_srlinux
type: ixrh2
type: ixr-h2
group: spine
mgmt-ipv4: 10.128.${INSTANCE_ID}.32
startup-config: configs/srl/__clabNodeName__.cfg
Expand All @@ -366,7 +366,7 @@ topology:
graph-level: "1"
leaf11:
kind: nokia_srlinux
type: ixrd2l
type: ixr-d2l
group: leaf
mgmt-ipv4: 10.128.${INSTANCE_ID}.33
binds:
Expand All @@ -384,7 +384,7 @@ topology:
graph-level: "1"
leaf12:
kind: nokia_srlinux
type: ixrd2l
type: ixr-d2l
group: leaf
mgmt-ipv4: 10.128.${INSTANCE_ID}.34
startup-config: configs/srl/__clabNodeName__.cfg
Expand All @@ -399,7 +399,7 @@ topology:
graph-level: "1"
leaf13:
kind: nokia_srlinux
type: ixrd2l
type: ixr-d2l
group: leaf
mgmt-ipv4: 10.128.${INSTANCE_ID}.35
binds:
Expand Down Expand Up @@ -494,7 +494,7 @@ topology:
# DC2
leaf21:
kind: nokia_srlinux
type: ixrd2l
type: ixr-d2l
group: leaf
mgmt-ipv4: 10.128.${INSTANCE_ID}.41
startup-config: configs/srl/leaf21.cfg
Expand Down Expand Up @@ -533,7 +533,7 @@ topology:
# MISC
ixp1:
kind: nokia_srlinux
type: ixrd2l
type: ixr-d2l
group: leaf
mgmt-ipv4: 10.128.${INSTANCE_ID}.51
startup-config: configs/srl/ixp1.cfg
Expand All @@ -548,7 +548,7 @@ topology:
graph-level: "1"
agg1:
kind: nokia_srlinux
type: ixrd2l
type: ixr-d2l
group: leaf
mgmt-ipv4: 10.128.${INSTANCE_ID}.52
startup-config: configs/srl/agg1.cfg
Expand All @@ -562,7 +562,7 @@ topology:
peering2:
kind: nokia_srlinux
license: /opt/srexperts/license-srlinux24.txt
type: ixrx3b
type: ixr-x3b
mgmt-ipv4: 10.128.${INSTANCE_ID}.53
startup-config: configs/srl/peering2.cfg
ports:
Expand Down
34 changes: 21 additions & 13 deletions docs/eda/advanced/service-automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This exercise shares the same goal as [Part 3](../beginner/virtual-networks.md):

--8<-- "docs/eda/intermediate/api.md:api-intro"

EDA users can use any REST API client to interact with the EDA API, and in the [EDA REST API](../intermediate/api.md) exercise you got a chance to use the **Postman** client to interact with the EDA API. In this advanced exercise you will adopt a more sophisticated and powerful approach, you will use Python and its httpx client library as a REST API client, and for extra kinks you will consume the EDA API via [Pydantic][pydantic] models generated for the EDA OpenAPI specification.
EDA users can use any REST API client to interact with the EDA API, and in the [EDA REST API](../intermediate/api.md) exercise you had a chance to use the **Postman** client to interact with the EDA API. In this advanced exercise you will adopt a more sophisticated and powerful approach, you will use Python and its `httpx` client library as a REST API client, and for extra fun you will consume the EDA API via [Pydantic][pydantic] models generated for the EDA OpenAPI specification.

/// admonition | Pydantic and OpenAPI
type: subtle-note
Expand Down Expand Up @@ -68,7 +68,12 @@ Before diving into the task of creating a **Virtual Network** with Python, let's

### Interface Pydantic Model

If you navigate in the EDA Ui to the -{{icons.topology()}}- → -{{icons.circle(letter="I", text="Interfaces")}}- and click for example on `leaf11-ethernet-1-49`, or visit the **EDA API documentation** (:octicons-question-24: icon in the top right), you'll notice that the resource definitions appear the same, only the format differs (YAML vs. JSON):
In EDA, all resources are schema driven, this means, that the representation of a resource may look different, but the structure is exactly the same, no matter what automation interface you use. For example, let's consider the Interface resource as it appears in the UI and in the API documentation.

In the EDA UI go to the -{{icons.topology()}}- → -{{icons.circle(letter="I", text="Interfaces")}}- and click on `leaf11-ethernet-1-49` to open the schema form.
In the other tab visit the **EDA API documentation** (:octicons-question-24: icon in the top right of the page) and open the **Interface Application API** tab.

You'll notice that the resource definition appears the same, only the format differs (YAML vs. JSON); see the screenshots below:

/// tab | EDA UI Interface yaml definition

Expand All @@ -81,12 +86,13 @@ If you navigate in the EDA Ui to the -{{icons.topology()}}- → -{{icons.circle(

///

Since EDA models its resources as Kubernetes Custom Resources (CRs), each object follows a familiar structure with four key elements:
Since EDA models its resources after the Kubernetes Custom Resources (CRs), each object follows a structure familiar to Kubernetes users:

- `apiVersion`: The API group and API version the object belongs to
- `kind`: What kind of object you want to create
- `kind`: What kind of object it is
- `metadata`: Identification fields like a `name` string and a `namespace`, plus auxiliary metadata like `labels` and `annotations`.
- `spec`: provides the specification for the resource - its configuration.
- `status`: (not shown here) provides state/status information about the resource, such as its current state, the nodes it is deployed on or health.

With Pydantic classes you can define EDA resources using native Python code, providing type validation, structure enforcement, and a more native development experience.

Expand Down Expand Up @@ -114,22 +120,22 @@ spec:
/// tab | Interface Pydantic definition

```python
import pydantic_eda.com.nokia.eda.interfaces.v1alpha1 as iface # (1)!
import pydantic_eda.apps.interfaces.v1alpha1.models as iface # (1)!


def interface(ns: str, name: str) -> iface.Interface: # (2)!
def interface(ns: str, name: str) -> iface.Interface: #(2)!
iface_ = iface.Interface(
apiVersion="interfaces.eda.nokia.com/v1",
kind="Interface",
metadata=iface.InterfaceMetadata( # (3)!
metadata=iface.InterfaceMetadata( #(3)!
name=name,
namespace=ns,
),
spec=iface.SpecModel( # (4)!
spec=iface.InterfaceSpec(
description="inter-switch link to spine11",
mtu=9198,
members=[
iface.Member(
iface.InterfaceSpecMember(
interface="ethernet-1-49",
node="g15-leaf11",
),
Expand All @@ -140,10 +146,10 @@ def interface(ns: str, name: str) -> iface.Interface: # (2)!
return iface_
```

1. The first thing we do is to import the Pydantic classes already generated.
1. The first thing we do is importing the Pydantic classes that have been already generated by the EDA community.
2. Our function takes as arguments the `namespace` and the `name` of the CR, and returns the **Interface** object.
3. **Metadata** is modeled as a class and takes the `namespace` and `name` as input.
4. The `spec` is also modeled as the **SpecModel** class.
4. The `spec` is also modeled as the **InterfaceSpec** class.
///

Click at each annotation :material-plus-circle: to see a explanation of that relevant section.
Expand Down Expand Up @@ -243,8 +249,10 @@ def virtualnetwork(ns: str, name: str) -> service.VirtualNetwork:
vnet = service.VirtualNetwork(
apiVersion="services.eda.nokia.com/v1",
kind="VirtualNetwork",
metadata=service.VirtualNetworkMetadata(name=name, namespace=ns, labels={"role": "exercise"}),
spec=service.SpecModel17(
metadata=service.VirtualNetworkMetadata(
name=name, namespace=ns, labels={"role": "exercise"}
),
spec=service.VirtualNetworkSpec(
routers=[
router,
],
Expand Down
6 changes: 3 additions & 3 deletions docs/eda/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ While the concept of declarative intents or blueprints is not new, in EDA made s

And it would be a miss to keep EDA anchored to Nokia-only devices, that is why we ensured that EDA core is **multivendor** and users can leverage EDA superpowers with other vendors and their devices and APIs[^1].

At SReXperts Hackathon, you get a unique chance to spend a day with EDA by venturing into the exercises meticulously crafted by the EDA team and be the judge of its capabilities.
At this SReXplore event, you get a unique chance to spend a day with EDA by venturing into the exercises meticulously crafted by the EDA team and be the judge of its capabilities.

## How to get through the exercises?

Expand Down Expand Up @@ -172,7 +172,7 @@ The workflow below demonstrates how a VLAN resource gets added to the transactio

## Namespace selector

When you first login to EDA as administrator, you have access to all available EDA namespaces. Since in this hackathon you will only work in the default `eda` namespace, you can select it using the namespace selector as shown below:
When you first login to EDA as administrator, you have access to all available EDA namespaces. Since in this event you will only work in the default `eda` namespace, you can select it using the namespace selector as shown below:

![ns-select](https://gitlab.com/rdodin/pics/-/wikis/uploads/10f8c7779ea629e14214fb88c1280edb/CleanShot_2025-05-14_at_23.27.05_2x.png)

Expand All @@ -182,7 +182,7 @@ By switching from All Namespaces to the `eda` namespace the UI will fill in the

As you go through the exercises, you will create and modify quite a few resources in EDA. It might happen that the resources from one unfinished challenge will interfere with the tasks you attempt next.

In such cases you can manually delete conflicting resources, but if you want to reset EDA to a state as it was at the beginning of the hackathon, you can easily do this by running the following command from the lab server:
In such cases you can manually delete conflicting resources, but if you want to reset EDA to a state as it was at the beginning of the event, you can easily do this by running the following command from the lab server:

```bash
bash /opt/srexperts/restore-eda.sh
Expand Down
34 changes: 17 additions & 17 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ hide:
- navigation
---

# Welcome to the Hackathon at SReXperts 2025
# Welcome to the SReXplore event at SReXperts 2025

Welcome to the 2025 SReXperts hackathon.
Welcome to the 2025 SReXplore event at SReXperts.

We are very glad to welcome you to this special event, the 20th anniversary for SReXperts (and the 5th for the hackathon).
We are very glad to welcome you to this special event, the 20th anniversary for SReXperts (and the 5th for the event).

Nokia prides itself on the excellent technical products, solutions that we deliver to the market, and this hackathon is no exception. A large team of engineers,
Nokia prides itself on the excellent technical products, solutions that we deliver to the market, and this event is no exception. A large team of engineers,
developers and product managers have been working hard to deliver what, we'll hope you agree, is a challenging and informative set of activities to challenge
you, no matter what you experience level.

## Open to all and something for everyone

Whether you're a relative novice to Nokia's products, or a seasoned expert, there is something in this hackathon for you! All you will need is your trusty laptop,
Whether you're a relative novice to Nokia's products, or a seasoned expert, there is something in this event for you! All you will need is your trusty laptop,
an afternoon of focus and possibly some coffee (supplied!) and you should find something to benefit both you and your organizations.

## Getting started

This page is your starting point into the hackathon, it should get you familiar with the lab environment provided by Nokia, and provide an overview of the suggested sample activities.
This page is your starting point into the event, it should get you familiar with the lab environment provided by Nokia, and provide an overview of the suggested sample activities.

**Please read this page all the way through before attempting any of the activities.**

Expand All @@ -32,8 +32,8 @@ Need help, not a problem, pop your hand in the air and an eager expert will be t

## Lab Environment

For this hackathon each (group of) participant(s) will receive their own dedicated cloud instance (VM) running a copy of the generic lab topology. You will see this called "your VM",
"your group's hackathon VM", "your instance", "your server" and other similar phrases in the activities. They all mean the same thing, your own dedicated could instance.
For this event each (group of) participant(s) will receive their own dedicated cloud instance (VM) running a copy of the generic lab topology. You will see this called "your VM",
"your group's hackathon VM", "your group's event VM", "your instance", "your server" and other similar phrases in the activities. They all mean the same thing, your own dedicated cloud instance.

If everything went according to plan, you should have received a physical piece of paper which contains:

Expand All @@ -42,13 +42,13 @@ If everything went according to plan, you should have received a physical piece
- HTTPS URL's for this repository and access to a web based IDE in case you don't have one installed on your operating system.

/// warning
The public cloud compute instances will be destroyed once the hackathon is concluded.</p>
The public cloud compute instances will be destroyed once the event is concluded.</p>
Please make sure to backup any code, config, etc. <u>offline</u> (e.g. onto your laptop) if you'd like to keep it after the hacakthon.
///

### Group ID

Please refer to the paper provided by the hackathon session leader. If nothing has been provided, not a problem, pop your hand in the air and someone will allocate you one before you can say "Aequeosalinocalcalinoceraceoaluminosocupreovitriolic".
Please refer to the paper provided by the event session leader. If nothing has been provided, not a problem, pop your hand in the air and someone will allocate you one before you can say "Aequeosalinocalcalinoceraceoaluminosocupreovitriolic".

| Group ID | hostname instance |
| --- | --- |
Expand All @@ -59,7 +59,7 @@ Please refer to the paper provided by the hackathon session leader. If nothing h

### SSH

The simplest way to get going is to use your SSH client to connect to your group's hackathon VM instance and work from there. All tools and applications are pre-installed and you will have direct access to your entire network.
The simplest way to get going is to use your SSH client to connect to your group's event VM instance and work from there. All tools and applications are pre-installed and you will have direct access to your entire network.

SSH is also important if you want to driectly access your network from your laptop but more on that later.

Expand All @@ -70,18 +70,18 @@ SSH is also important if you want to driectly access your network from your lapt
| password | `refer to the paper provided or the slide presented` |

/// tip
If you're familiar with SSH and wish to setup passwordless access, you can use `ssh-keygen -h` to generate a public/private key pair and then `ssh-copy-id` to copy it towards your group's hackathon instance.
If you're familiar with SSH and wish to setup passwordless access, you can use `ssh-keygen -h` to generate a public/private key pair and then `ssh-copy-id` to copy it towards your group's event instance.
///

### WiFi

WiFi is important here. Without it your hackathon experience is going to be rather dull. To connect to the hackthon event's WiFi, refer to the paper provided or the slide presented.
WiFi is important here. Without it your event experience is going to be rather dull. To connect to the hackthon event's WiFi, refer to the paper provided or the slide presented.

### Topology

When accessing your hackathon VM instance you'll find that the [SReXperts GitHub repository](https://github.com/nokia/srexperts) contains all of the documentation, examples, solutions and loads of other great stuff, has already been cloned for you.
When accessing your event VM instance you'll find that the [SReXperts GitHub repository](https://github.com/nokia/srexperts) contains all of the documentation, examples, solutions and loads of other great stuff, has already been cloned for you.

In this hackathon, every group has their own complete service-provider network at their disposal. Your network comprises an IP backbone with Provider (P) and Provider Edge (PE) routers, a broadband dial-in network, a peering edge network, an internet exchange point, multiple data-centers and a number of client and subscriber devices. This network is already deployed and provisioned and is ready to go!
In this event, every group has their own complete service-provider network at their disposal. Your network comprises an IP backbone with Provider (P) and Provider Edge (PE) routers, a broadband dial-in network, a peering edge network, an internet exchange point, multiple data-centers and a number of client and subscriber devices. This network is already deployed and provisioned and is ready to go!

*Don't worry: This is your personal group network, you cannot impact any other groups.*

Expand Down Expand Up @@ -112,7 +112,7 @@ The above topology contains a number of functional blocks to help you in areas y

### Accessing Topology nodes

#### From your group's hackathon instance VM
#### From your group's event instance VM

To access the lab nodes from within the VM, users should identify the names of the deployed nodes using the `sudo containerlab inspect -a` command. You will notice they all start with `clab-srexperts-`. Your entire network is [powered by ContainerLab](https://containerlab.dev).

Expand Down Expand Up @@ -1212,4 +1212,4 @@ gh repo clone nokia/SReXperts

## Thanks and contributions

As you can imagine, creating the activities that make up this hackathon is a lot of work. The hackathon team would like to thank the following team members (in alphabetical order) for their contributions: Asad Arafat, Bhavish Khatri, Diogo Pinheiro, Guilherme Cale, Hans Thienpondt, James Cumming, Joao Machado, Kaelem Chandra, Laleh Kiani, Louis Van Eeckhoudt, Maged Makramalla, Miguel Redondo Ferrero, Roman Dodin, Saju Salahudeen, Samier Barguil, Shafkat Waheed, Shashi Sharma, Simon Tibbitts, Siva Sivakumar, Subba Konda, Sven Wisotzky, Thomas Hendriks, Tiago Amado. Zeno Dhaene, Tim Raphael and Vasileios Tekidis
As you can imagine, creating the activities that make up this event is a lot of work. The event team would like to thank the following team members (in alphabetical order) for their contributions: Asad Arafat, Bhavish Khatri, Diogo Pinheiro, Guilherme Cale, Hans Thienpondt, James Cumming, Joao Machado, Kaelem Chandra, Laleh Kiani, Louis Van Eeckhoudt, Maged Makramalla, Miguel Redondo Ferrero, Roman Dodin, Saju Salahudeen, Samier Barguil, Shafkat Waheed, Shashi Sharma, Simon Tibbitts, Siva Sivakumar, Subba Konda, Sven Wisotzky, Thomas Hendriks, Tiago Amado. Zeno Dhaene, Tim Raphael and Vasileios Tekidis
Loading