Commit Graph

78 Commits

Author SHA1 Message Date
Saikrishna Arcot
3bf2c54768 Update slave.mk to assume a Bookworm base image
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2023-11-21 18:53:15 -08:00
Saikrishna Arcot
b46f967474 Add Bookworm slave container
Changes from Bullseye slave container:
* Python 2 is no longer available at all
* Python 3.11 (instead of Python 3.9)
* GCC 12 (instead of GCC 10)
* Python ipaddr package is no longer available
* OpenJDK 17 (instead of OpenJDK 11)
* Remove doxygen armhf manual compilation (no longer needed)
* Disable FIPS, as the FIPS binaries are currently not yet available
* Install Python setuptools through Debian instead of pip
* Install Python wheel through Debian instead of pip
* Install Python nose through Debian instead of pip
* Install Python j2cli through Debian instead of pip
* Install Python pexpect through Debian instead of pip
* Install Python parameterized through Debian instead of pip
* Install Python pyyaml through Debian instead of pip
* Install Python pyfakefs through Debian instead of pip
* Install Python m2crypto through Debian instead of pip
* Python pympler 1.0 (instead of 0.8)
* Install Python build (as a replacement to setup.py)

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2023-11-21 18:53:15 -08:00
Liu Shilong
364045cfe5
[build] Add retry when make SONiC image to improve success rate. (#12325)
Why I did it
Makefile needs some dependencies from the Internet. It will fail for network related issue.
Retries will fix most of these issues.

How I did it
Add retries when running commands which maybe related with networking.

How to verify it
2022-12-19 12:18:36 +08:00
Saikrishna Arcot
3226c40581
[build]: Disable stretch slave container (#12868)
The only platforms that currently need the stretch slave container are
innovium and nephos, and both are not building with the current code due
to other issues. All other platforms only need buster and bullseye slave
containers.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-12-01 09:26:46 -08:00
Kalimuthu-Velappan
c691b73959
01.Version-cache - restructuring of Makefile.work (#12000)
- The Makefile.work becomes complex and it is very difficult to manage the changes across branches.
- Restructured the Makefile.work and it becomes more readable.
- Added $(QUIET) option to turn on command echo mode through command line option.
- Exported the SONIC_BUILD_VARS variable, through which make options can be set dynamically.
	Eg: make SONIC_BUILD_VARS='INCLUDE_NAT=y'
2022-10-04 14:13:40 -07:00
Kalimuthu-Velappan
bc30528341
Parallel building of sonic dockers using native dockerd(dood). (#10352)
Currently, the build dockers are created as a user dockers(docker-base-stretch-<user>, etc) that are
specific to each user. But the sonic dockers (docker-database, docker-swss, etc) are
created with a fixed docker name and common to all the users.

    docker-database:latest
    docker-swss:latest

When multiple builds are triggered on the same build server that creates parallel building issue because
all the build jobs are trying to create the same docker with latest tag.
This happens only when sonic dockers are built using native host dockerd for sonic docker image creation.

This patch creates all sonic dockers as user sonic dockers and then, while
saving and loading the user sonic dockers, it rename the user sonic
dockers into correct sonic dockers with tag as latest.

	docker-database:latest <== SAVE/LOAD ==> docker-database-<user>:tag

The user sonic docker names are derived from 'DOCKER_USERNAME and DOCKER_USERTAG' make env
variable and using Jinja template, it replaces the FROM docker name with correct user sonic docker name for
loading and saving the docker image.
2022-04-28 08:39:37 +08:00
Saikrishna Arcot
6105684b9e Add infra to support building Bullseye base image with Buster containers
All docker containers will be built as Buster containers, from a Buster
slave. The base image and remaining packages that are installed onto the
host system will be built for Bullseye, from a Bullseye slave.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2021-11-10 15:27:22 -08:00
VenkatCisco
702e852ee1
Platform/cisco-8000 module for sonic-buildimage (#8172)
Why I did it
Update Makefile, so it does the following:
For a given platform, verify if platform/checkout/.ini exists and hence run the platform/checkout/template.j2. This allows platform code to be checked out during the 'make configure' stage.

How I did it
git clone git@github.com:Azure/sonic-buildimage.git
mkdir platform/cisco-8000

make init
make configure PLATFORM=cisco-8000
make all
2021-08-06 09:11:54 +08:00
Saikrishna Arcot
a1fb1dee78 Update the makefiles to allow using Bullseye slave image
This adds the Makefile changes to use the Bullseye slave image, but
doesn't use it by default. There should be no functional changes with
this change (Buster will still be used for now).

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2021-07-15 00:02:18 -07:00
lguohan
8060142f9c
[build]: disable build sonic-slave-jessie by default (#6297)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-12-24 21:55:20 -08:00
xumia
0a36de3a89
Recover "Support SONiC Reproduceable Build-debian/pip/web packages (#6255)
* Revert "Revert "Support SONiC Reproduceable Build-debian/pip/web packages (#5718)""

This reverts commit 17497a65e3.

* Revert "Revert "Remove unnecessary sudo authority in build Makefile (#6237)""

This reverts commit 163b7111b5.
2020-12-21 15:31:10 +08:00
Guohan Lu
17497a65e3 Revert "Support SONiC Reproduceable Build-debian/pip/web packages (#5718)"
This reverts commit 55a707586b.
2020-12-18 23:37:27 -08:00
xumia
55a707586b
Support SONiC Reproduceable Build-debian/pip/web packages (#5718)
* Support SONiC reproduceable build for deb/py2/py3/web

* Remove j2 files

* Fix bug

* Fix some issues

1. Change some code format issues
2. Fix curl calling wget command, pip2 calling pip3 issue
3. Fix wget/curl downloading multiple urls issue

* Fix some code format issue

* Fix bug

* Fix bug

* Fix command path hard code in build info scripts issue

* Add debian package sonic-build-tools

* Fix auto debian package removed issue

* Change build debian package name, and change the folder

* Collect the pre-versions and post-versions

* Change to use debian:buster

* Remove apt-mark and improve code

* Remove set_build_hooks

* Change docker trusted gpg files

* Fix docker build COPY directory name issue

* Move the trusted gpg files into the sonic-build-hooks package
2020-12-17 13:06:53 +08:00
Ying Xie
68f1352159
[makefile] re-organize make file so init only execute once (#6160)
- Why I did it
make init executed 3 times, which is unnecessary.

- How I did it
reorganize the makefile so that init only executed once.

- How to verify it
make reset
make init

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2020-12-09 14:13:33 -08:00
Guohan Lu
01cb7934b0 [build]: add buster docker as the last step of the build proces
- build SONIC_STRETCH_DOCKERS in sonic-slave-stretch docker
- build image related module in sonic-slave-buster docker.
  This includes all kernels modules and some packages

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-04-16 10:26:18 +00:00
Guohan Lu
358d93eeb5 [sonic-slave-buster]: build sonic-slave-buster docker
- add sonic-slave-buster docker
- remove debhelper from buster backports
  debhelper in buster is enough to build smartmontools 6.6

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-04-16 10:23:20 +00:00
Ying Xie
1515e39e71 [makefile] build Jessie slave unless NOJESSIE is specified (#3546)
* [makefile] build Jessie slave unless NOJESSIE is specified
* fix if condition
2019-10-01 21:12:19 -07:00
lguohan
30b37ec6fb
[build]: make sonic-slave-stretch as the default build docker (#2921)
Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-05-27 15:50:51 -07:00
lguohan
8080695ecf
[docker-{sonic,syncd}-vs]: upgrade {sonic,syncd}-vs docker to stretch (#2865)
* [docker-{sonic,syncd}-vs]: upgrade sonic-vs and syncd-vs docker to stretch

* remove python-click 6.6

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-05-06 07:19:36 -07:00
Ying Xie
a8ccf589c9 [build]: Makefile: make new step "make stretch" optional (#1936)
* [makefile] Rename Makefile to Makefile.work

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [makefile] Add new make file to avoid extra step

* avoiding calling "make stretch"

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [makefile] allow skipping "make stretch"

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [makefile] add all PHONY targets to pass through list

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-08-16 15:54:31 -07:00
lguohan
e15cf2d66a
[build]: print error message when use root or sudo to build. (#1923)
Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-08-13 18:30:22 -07:00
Guohan Lu
a7192939a0 [build]: sonic-slave-stretch- sha both Dockerfile and Dockerfile.user 2018-08-11 09:07:59 +00:00
Guohan Lu
a87da7b1f9 [build]: build stretch-based sonic slave docker 2018-08-11 09:07:59 +00:00
Guohan Lu
8c72d8c6f2 [build]: insert overlay kmod for base image build 2018-08-11 09:07:59 +00:00
Ying Xie
3c33737d58
[make] introducing new build option KERNEL_PROCURE_METHOD (#1837)
* [make] introducing new build option KERNEL_BUILD_METHOD

- Kernel could be built from source files with method 'build'
- Kernel could be downloaded from Azure storage with method 'download'

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* Replace BUILD with PROCURE

* fix typo
2018-07-25 08:14:18 -07:00
lguohan
7edbf5d6f0
[build]: add show docker tag (#1833) 2018-07-01 09:46:42 -07:00
Jipan Yang
f0690b246b [build]: Fix the problem of ENABLE_SYSTEM_TELEMETRY not taking effect in rules/config (#1615)
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2018-04-18 00:31:12 -07:00
Jipan Yang
f74de8914b [telemetry]: SONiC system telemetry Support (#1526)
* SONiC system telemetry Support

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Update package name from telemetry to sonic-telemetry

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2018-03-27 13:39:04 -07:00
Wenda Ni, Ph.D
17b09ef06a [build]: Move the mounting point inside the docker to home directory (#1522)
* Move the mounting point inside the docker to home directory

Signed-off-by: Wenda <wenni@microsoft.com>

* Change mount point to src under the home directory

Signed-off-by: Wenda <wenni@microsoft.com>
2018-03-24 02:36:48 -07:00
sihuihan88
7639cc1b53 [pfcwd]: add flag to enable pfc wd on start (#1429) 2018-03-05 23:55:37 -08:00
lguohan
15d433d975
[build]: allow to use http(s) proxy in the build (#1265)
* allow to use http(s) proxy in the build

To enable this, use following command
http_proxy=[your_proxy] https_proxy=[your_proxy] make
2017-12-23 23:34:15 -08:00
Joe LeVeque
ee73cdec26
Add 'make reset' target with warning prompt to reset git repo and submodules (#1258) 2017-12-21 11:15:06 -08:00
Ying Xie
eadd74fb84
[build] allow user to override the default number of build jobs (#1255)
User could issue SONIC_BUILD_JOBS=<num> to set number of concurrent
build job(s) to run.

With this commit, the default setting is still left at 1.
2017-12-20 15:25:30 -08:00
Ying Xie
d3765066fe
[make] Introducing build option SOURCE_FOLDER (#1155)
When KEEP_SLAVE_ON=yes and SOURCE_FOLDER is defined, the path pointed
by SOURCE_FOLDER will be mounted in the build slave docker at /var/src.

This option allows user to mount an extra path into the build slave
when the slave is left running. Usually when user need to build extra
stuff in SOURCE_FOLDER.
2017-11-16 08:15:14 -08:00
Samuel Angebault
a7e602501c Use sha1sum instead of shasum for portability (#1113)
sha1sum is a better option to use since it is part of the coreutil package.
shasum is owned by perl which might not always exist on the host system.
2017-11-03 14:36:26 -07:00
Ying Xie
41f226f0dc [build] capture 2 initialization git commands in 'make init' target (#1074) 2017-10-24 19:49:37 -07:00
Shuotian Cheng
27cac94da7 [Makefile]: Fix unmatched variable name ENABLE_SYNCD_RPC (#1032)
Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
2017-10-11 17:46:26 -07:00
Rodny Molina
b5eb0c2ce2 [Makefile] Allowing interactive session with the slave docker-container (#903)
* Fixing a couple of issues to enable FRR to run with latest SONiC code.

* Adjusting FRR's jinja template to meet latest sonic-cfgen requirements. Basically, i'm just extending #448 changes into FRR.

* Eliminate FRR's integrated-config file to prevent daemons from bypassing their own config files. FRR daemons now default to an integrated-config file for config-parsing purposes. But we are still interested in having each daemon looking in their specific config file (bgpd.conf, zebra.conf, etc). So here i'm just deleting this integrating-config file to prevent FRR from running from a bogus config-file.

* Allows interactive session with the slave docker-container after conclusion of the building process.

Proposed changes provide a more direct access to the building pipeline,
by allowing users to launch consecutive compilation tasks from the same
slave container.
2017-09-22 00:57:23 -07:00
lguohan
d3997f4a35 [sonic-slave]: SLAVE_TAG should be for both Dockerfile and Dockerfile.user (#950)
Should rebuild both Dockerfile and Dockerfile.user when any of the two
files change.
2017-09-09 15:22:52 -07:00
Marian Pritsak
afbf1ee2fb [sonic-slave]: Split user commands from generic. (#868)
In case when more than one user builds SONiC on same machine, we can
keep generic part that installs all packages to slave image apart from
creating user and calling user-related commands. Then generic base image
will be built only once, allowing other users to build only smaller
specific to them layers.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-08-08 10:21:54 +03:00
Marian Pritsak
1c165067af [Makefile]: Remove lockfile before build (#847)
In case previous build was forcefully stopped, we need to remove screen
lock so that build won't be stuck.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-07-27 07:52:12 +03:00
Marian Pritsak
7cf8479182 [Makefile]: Set build directory as docker workdir (#832)
Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-07-24 12:29:36 +03:00
Marian Pritsak
bc4ee14340 [Makefile]: Automatically deduce pseudo-TTY option (#830)
Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-07-24 10:52:51 +03:00
lguohan
3fd2014e93 [sonic-mgmt]: move sonic-mgmt docker build into sonic-slave (#819)
need to install sonic-device-data into sonic-mgmt docker
2017-07-19 08:10:45 -07:00
Taoyu Li
5e6620e19e [bgp] Save bgp admin state (#690)
* [bgp] Save admin state and set default state to shutdown

* Set default behavior to no shutdown

* Add build option SHUTDOWN_BGP_ON_START

* Script change for default admin state to be on

* Address CR comments to bgp_neighbor script

* Fix script bug
2017-06-12 11:05:22 -07:00
Marian Pritsak
520fff5b2d Add ENABLE_SYNCD_RPC option (#642)
Under rules/config now there's additional configuration option
ENABLE_SYNCD_RPC that allows building SONIC installer with
docker-syncd-*-rpc for evaluation purposes.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-05-30 16:17:03 -07:00
lguohan
6c24574e9f [mgmt]: add sonic-mgmt docker for running test in sonic-mgmt repo (#606)
* [mgmt]: add sonic-mgmt docker for running test in sonic-mgmt repo
2017-05-18 16:54:48 -07:00
lguohan
2e9b92e1c1 [build]: allow to customize USERNAME and PASSWORD in command line (#492)
* [build]: allow to customize USERNAME and PASSWORD in command line

* use default password and username if not specified in the command line
2017-04-12 11:23:48 -07:00
Marian Pritsak
6dbe979e5f [build]: Include SONiC version into installer. (#472)
* [build]: Include SONiC version into installer.

Signed-off-by: marian-pritsak <marianp@mellanox.com>

* Append dirty if contains local changes

Signed-off-by: marian-pritsak <marianp@mellanox.com>

* Update config

* Use correct name for kernel version field

* Update sysDescription.j2
2017-04-05 16:14:41 -07:00
lguohan
0ed9b3ce28 [platform]: remove sku from build parameter (#350)
different sku will be contained in a single one sonic image.
no longer need to specify sku at the build time
2017-03-01 17:05:13 -08:00