Build only a part of SONiC

127 views
Skip to first unread message

Sumukha R

unread,
Jun 8, 2023, 5:59:49 AM6/8/23
to sonicproject
Hi,

I'd like to use the SONiC cli-autogen utility on a VM (Ubuntu 20.04). Please suggest if there is any way to build it without replicating the whole SONiC base image with only required docker container.

Thanks in advance.
Sumukha R


Rida Hanif

unread,
Jun 8, 2023, 8:48:14 AM6/8/23
to Sumukha R, sonicp...@googlegroups.com, Sonic
Hi Sumukha,

Yes you can only build the required docker container of SONiC without replicating the whole base image, in your case you can build sonic-utilities container. Kindly find the attached guide for your reference. 


Thanks and Warm Regards,
Rida Hanif
Senior Engineer 
xFlow Research (Pvt.) Ltd.


--
You received this message because you are subscribed to the Google Groups "sonicproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonicproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonicproject/6e87a144-0dea-49a5-b96f-9b69b9bd779dn%40googlegroups.com.



SONiC Utilities Local Build Guide.pdf

Sumukha R

unread,
Jun 11, 2023, 9:11:41 AM6/11/23
to sonicproject
Hi Rida,

I couldn't clone only the sonic-utilities container. In the document it says to edit url in .gitmodules. However, it clones every other submodule alos. If they are removed, it stops with errors. Please suggest steps to clone only the utilities. 

Thanks in advance
Sumukha R

Rida Hanif

unread,
Jun 12, 2023, 12:16:02 AM6/12/23
to Sumukha R, sonicproject, Sonic
Hi Sumukha,

This is a required step, as at first, the init process has to clone all sonic repositories in order to set up the sonic build process. These all repositories are necessary(dependency) and used by the sonic-utilities container.  I would suggest you to please follow all steps provided in the guide and you will build your own sonic-utilities container.


Thanks,
Rida

Sumukha R

unread,
Jun 19, 2023, 5:10:51 AM6/19/23
to sonicproject
Hi Rida,

I was able to build the SONiC for vs platform and built the sonic utilities container on top of it. I can access the yang-models, py files, etc. However, to make use of the sonic-cli-gen facility, login is required. I use "make sonic-slave-bash" to get into the slave container. 

SONiC Build System

Build Configuration
"CONFIGURED_PLATFORM"             : "vs"
"CONFIGURED_ARCH"                 : "amd64"
"SONIC_CONFIG_PRINT_DEPENDENCIES" : ""
"SONIC_BUILD_JOBS"                : "1"
"SONIC_CONFIG_MAKE_JOBS"          : "15"
"USE_NATIVE_DOCKERD_FOR_BUILD"    : ""
"SONIC_USE_DOCKER_BUILDKIT"       : ""
"USERNAME"                        : "admin"
"PASSWORD"                        : "YourPaSsWoRd"
"CHANGE_DEFAULT_PASSWORD"         : "n"
"SECURE_UPGRADE_MODE"             : "no_sign"
"SECURE_UPGRADE_DEV_SIGNING_KEY"  : ""
"SECURE_UPGRADE_SIGNING_CERT" : ""
"SECURE_UPGRADE_PROD_SIGNING_TOOL": ""
"SECURE_UPGRADE_PROD_TOOL_ARGS"   : ""
"ENABLE_DHCP_GRAPH_SERVICE"       : ""
"SHUTDOWN_BGP_ON_START"           : ""
"ENABLE_PFCWD_ON_START"           : ""
"SONIC_BUFFER_MODEL"              : ""
"INSTALL_DEBUG_TOOLS"             : ""
"ROUTING_STACK"                   : "frr"
"FRR_USER_UID"                    : "300"
"FRR_USER_GID"                    : "300"
"ENABLE_SYNCD_RPC"                : ""
"SAITHRIFT_V2"                    : ""
"ENABLE_ORGANIZATION_EXTENSIONS"  : "y"
"HTTP_PROXY"                      : "http://web-proxy.in.hpecorp.net:8080/"
"HTTPS_PROXY"                     : "http://web-proxy.in.hpecorp.net:8080/"
"NO_PROXY"                        : "localhost"
"ENABLE_ZTP"                      : ""
"INCLUDE_PDE"                     : ""
"SONIC_DEBUGGING_ON"              : ""
"SONIC_PROFILING_ON"              : ""
"KERNEL_PROCURE_METHOD"           : "build"
"BUILD_TIMESTAMP"                 : "20230619.143025"
"BUILD_LOG_TIMESTAMP"             : "none"
"SONIC_IMAGE_VERSION"             : "master.0-e3d046b1d"
"BLDENV"                          : "buster"
"VS_PREPARE_MEM"                  : "yes"
"INCLUDE_MGMT_FRAMEWORK"          : "y"
"INCLUDE_ICCPD"                   : "n"
"INCLUDE_SYSTEM_TELEMETRY"        : "y"
"ENABLE_HOST_SERVICE_ON_START"    : "y"
"INCLUDE_RESTAPI"                 : "n"
"INCLUDE_SFLOW"                   : "y"
"ENABLE_SFLOW_DROPMON"            : "n"
"INCLUDE_NAT"                     : "y"
"INCLUDE_DHCP_RELAY"              : "y"
"INCLUDE_P4RT"                    : "y"
"INCLUDE_KUBERNETES"              : "n"
"INCLUDE_KUBERNETES_MASTER"       : "n"
"INCLUDE_MACSEC"                  : "y"
"INCLUDE_MUX"                     : "y"
"INCLUDE_TEAMD"                   : "y"
"INCLUDE_ROUTER_ADVERTISER"       : "y"
"INCLUDE_BOOTCHART                : "y"
"ENABLE_BOOTCHART                 : "n"
"ENABLE_FIPS_FEATURE"             : "y"
"ENABLE_TRANSLIB_WRITE"           : ""
"ENABLE_NATIVE_WRITE"             : "y"
"ENABLE_AUTO_TECH_SUPPORT"        : "y"
"PDDF_SUPPORT"                    : "y"
"MULTIARCH_QEMU_ENVIRON"          : "n"
"SONIC_VERSION_CONTROL_COMPONENTS": "none"
"ENABLE_ASAN"                     : "n"
"DEFAULT_CONTAINER_REGISTRY"      : ""
"BUILD_MULTIASIC_KVM"             : "n"
"CROSS_BUILD_ENVIRON"             : "n"
"GZ_COMPRESS_PROGRAM"             : "gzip"

"SONIC_DPKG_CACHE_METHOD"         : "none"


This is what is displayed and next would be the same with BUILDENV as bullseye. I can see the name and password but cant figure out how to login. The " telnet localhost <port no.>" didn't work. Please suggest how to do this.

Thanks in advance
Sumukha

Reply all
Reply to author
Forward
0 new messages