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

feature: preconf #125

Merged
merged 2 commits into from
Jun 30, 2024
Merged

feature: preconf #125

merged 2 commits into from
Jun 30, 2024

Conversation

kazubu
Copy link
Contributor

@kazubu kazubu commented Jun 30, 2024

I would like to add preconf configuration that is originally implemented on slankdev/tinet. I am heavily using it for define global variables used in every node configurations like as below:

preconf:
  - cmds:
      - cmd: ROUTER_ID_PREFIX='10.255.0'

node_configs:
  - name: R1
    cmds:
      - cmd: /usr/lib/frr/frr start
      - cmd: >-
          vtysh -c "conf t"
          -c "bgp router-id $ROUTER_ID_PREFIX.1"
  - name: R2
    cmds:
      - cmd: /usr/lib/frr/frr start
      - cmd: >-
          vtysh -c "conf t"
          -c "bgp router-id $ROUTER_ID_PREFIX.2"
$ tinet conf -c spec.yaml
ROUTER_ID_PREFIX='10.255.0' > /dev/null
docker exec R1 /usr/lib/frr/frr start > /dev/null
docker exec R1 vtysh -c "conf t" -c "bgp router-id $ROUTER_ID_PREFIX.1" > /dev/null
docker exec R2 /usr/lib/frr/frr start > /dev/null
docker exec R2 vtysh -c "conf t" -c "bgp router-id $ROUTER_ID_PREFIX.2" > /dev/null

@slankdev slankdev merged commit 6cfe448 into tinynetwork:master Jun 30, 2024
5 checks passed
@kazubu kazubu deleted the feature/preconf branch June 30, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants