Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dockers/docker-fpm-frr/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ chmod 0755 /usr/sbin/bgp-unisolate
mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status

rm -f /var/run/rsyslogd.pid
#rm -f /var/run/rsyslogd.pid

supervisorctl start rsyslogd
#supervisorctl start rsyslogd

supervisorctl start bgpcfgd

Expand Down
4 changes: 2 additions & 2 deletions dockers/docker-orchagent/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ fi

export platform=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`

rm -f /var/run/rsyslogd.pid
#rm -f /var/run/rsyslogd.pid

supervisorctl start rsyslogd
#supervisorctl start rsyslogd

supervisorctl start orchagent

Expand Down
17 changes: 17 additions & 0 deletions platform/vs/README.gns3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
HOWTO Create a GNS3 Appliance File (.gns3a)


Execute the command sonic-gns3.sh


For instance:

./sonic-gns3a.sh -h

sonic-gns3a.sh [ -r <ReleaseNumber> ] -b <SONiC VS image: sonic-vs.image>
e.g.: sonic-gns3a.sh -r 1.1 -b <store_path>/sonic-vs.img

For more information about GNS3, please refer to:

https://gns3.com/

81 changes: 81 additions & 0 deletions platform/vs/sonic-gns3a.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/bin/bash

# This script creates a .gns3a SONiC appliance file
IMGFILE="sonic-vs.image"
RELEASE="latest"

usage() {
echo "`basename $0` [ -r <ReleaseNumber> ] -b <SONiC VS image: sonic-vs.image>"
echo "e.g.: `basename $0` -r 1.1 -b <store_path>/sonic-vs.image"
exit 0
}

while getopts "r:b:h" arg; do
case $arg in
h)
usage
;;
r)
RELEASE=$OPTARG
;;
b)
IMGFILE=$OPTARG
;;
esac
done

if [ ! -e ${IMGFILE} ]; then
echo "ERROR: ${IMGFILE} not found"
exit 2
fi


MD5SUMIMGFILE=`md5sum ${IMGFILE} | cut -f 1 -d " "`
LENIMGFILE=`stat -c %s ${IMGFILE}`
GNS3APPNAME="SONiC-${RELEASE}.gns3a"
NAMEIMGFILE=`basename $IMGFILE`

echo "
{
\"name\": \"SONiC\",
\"category\": \"router\",
\"description\": \"SONiC Virtual Switch/Router\n\",
\"vendor_name\": \"SONiC\",
\"vendor_url\": \"https://azure.github.io/SONiC/\",
\"product_name\": \"SONiC\",
\"product_url\": \"https://azure.github.io/SONiC/\",
\"registry_version\": 3,
\"status\": \"experimental\",
\"maintainer\": \"SONiC\",
\"maintainer_email\": \"[email protected]\",
\"usage\": \"Supports SONiC release: ${RELEASE}\",
\"qemu\": {
\"adapter_type\": \"e1000\",
\"adapters\": 10,
\"ram\": 2048,
\"hda_disk_interface\": \"virtio\",
\"arch\": \"x86_64\",
\"console_type\": \"telnet\",
\"boot_priority\": \"d\",
\"kvm\": \"require\"
},
\"images\": [
{
\"filename\": \"${NAMEIMGFILE}\",
\"version\": \"${RELEASE}\",
\"md5sum\": \"${MD5SUMIMGFILE}\",
\"filesize\": ${LENIMGFILE}
}
],
\"versions\": [
{
\"name\": \"${RELEASE}\",
\"images\": {
\"hda_disk_image\": \"${NAMEIMGFILE}\"
}
}
]
}

" > ${GNS3APPNAME}

1 change: 1 addition & 0 deletions rules/docker-fpm-frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ $(DOCKER_FPM_FRR)_CONTAINER_NAME = bgp
$(DOCKER_FPM_FRR)_RUN_OPT += --net=host --privileged -t
$(DOCKER_FPM_FRR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_FPM_FRR)_RUN_OPT += -v /etc/sonic/frr:/etc/frr:rw
$(DOCKER_FPM_FRR)_RUN_OPT += -v /run/systemd/journal/dev-log:/dev/log:rw

$(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += vtysh:/usr/bin/vtysh
$(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TSA:/usr/bin/TSA
Expand Down
2 changes: 2 additions & 0 deletions rules/docker-orchagent.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ $(DOCKER_ORCHAGENT)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interf
$(DOCKER_ORCHAGENT)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
$(DOCKER_ORCHAGENT)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_ORCHAGENT)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
$(DOCKER_ORCHAGENT)_RUN_OPT += -v /run/systemd/journal/dev-log:/dev/log:rw


$(DOCKER_ORCHAGENT)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
$(DOCKER_ORCHAGENT)_FILES += $(ARP_UPDATE_SCRIPT) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)