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

Development #51

Closed
wants to merge 2 commits into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Go",
"image": "mcr.microsoft.com/devcontainers/go:0-1.19-bullseye",
"image": "mcr.microsoft.com/devcontainers/go:0-1.20-bullseye",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/topoviewer filter=lfs diff=lfs merge=lfs -text
44 changes: 44 additions & 0 deletions .github/workflows/docker-ci-v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Docker Image CI V2

on: [workflow_dispatch]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
43 changes: 43 additions & 0 deletions .github/workflows/docker-ci-v3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Docker Image CI V3

on: [workflow_dispatch]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
61 changes: 61 additions & 0 deletions .github/workflows/docker-ci-v4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Docker Image CI V4

<<<<<<< HEAD
on:
workflow_dispatch:
=======
on: [workflow_dispatch]
>>>>>>> 8051b90f (commit with tag nightly-24.10.26c)

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
<<<<<<< HEAD
- name: Checkout repository
uses: actions/checkout@v3
=======
- name: Checkout repository with Git LFS
uses: actions/checkout@v3
with:
lfs: true # Ensure LFS files are downloaded

- name: Set up Git LFS
run: git lfs install

- name: Pull LFS files
run: git lfs pull # Ensure large files are pulled from LFS
>>>>>>> 8051b90f (commit with tag nightly-24.10.26c)

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
logs/*
rawTopoFile/clab/*
rawTopoFile/clab/**
rawTopoFile/license.txt
rawTopoFile/topo-vf-hco-ip-certification.yml
rawTopoFile/clab-topoViewerDemo/**
rawTopoFile/topo-clab-demo.yaml
rawTopoFile/topo-clab-demo.bak
rawTopoFile/clab-demo/*


config/*
webpack.config.js
.babelrc
go_tools/ygot
go_tools/ygot/**
html-static/template/clab/button.tmpl
node_modules/**
_archive/**
html-public/**
html-react/**
README-copy.md
README-copy2.md
package-lock.json
package.json
.cache/**
clab-3tierSmall/**
README-02.md
7 changes: 7 additions & 0 deletions .topoViewer.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"folders": [
{
"path": "."
}
]
}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"pejmannikram.vscode-auto-scroll",
"emilast.logfilehighlighter",
"golang.go"
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files.associations": {
"/actions/*": "yaml",
"/workflows/*": "yaml"
}
}
46 changes: 46 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# syntax=docker/dockerfile:1

FROM ubuntu:latest
WORKDIR ./opt/topoviewer

USER root:root

# RUN echo 'root:admin' | chpasswd

# add users
# RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1001 suuser
# RUN echo 'suuser:suuser' | chpasswd
# RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1002 admin
# RUN echo 'admin:admin' | chpasswd

# # Install packages
# RUN apt-get update && apt-get install -y openssh-server iproute2 iputils-ping vim wget sudo

# # Config SSH
# RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# RUN echo "HostKeyAlgorithms ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519" >> /etc/ssh/ssh_config
# RUN echo "KexAlgorithms diffie-hellman-group1-sha1,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1" >> /etc/ssh/ssh_config

# # Download dist folder
# COPY ./dist /opt/topoviewer

# Consolidate RUN Commands
RUN echo 'root:admin' | chpasswd && \
useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1001 suuser && \
echo 'suuser:suuser' | chpasswd && \
useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1002 admin && \
echo 'admin:admin' | chpasswd && \
apt-get update && apt-get install -y openssh-server iproute2 iputils-ping vim wget sudo curl rsyslog && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
echo "HostKeyAlgorithms ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519" >> /etc/ssh/ssh_config && \
echo "HostKeyAlgorithms ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519" >> /etc/ssh/ssh_config && \
echo "KexAlgorithms diffie-hellman-group1-sha1,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1" >> /etc/ssh/ssh_config

# Download dist folder
COPY ./dist /opt/topoviewer

#expose port
EXPOSE 8080 22 514

ENTRYPOINT rsyslogd && service ssh restart && bash

Loading