Skip to content

Commit

Permalink
Initial release (#12)
Browse files Browse the repository at this point in the history
* Initial release

Signed-off-by: Rajendra Dendukuri <[email protected]>
  • Loading branch information
rajendra-dendukuri authored and lguohan committed Nov 7, 2019
1 parent 917b8ed commit 374c9e8
Show file tree
Hide file tree
Showing 62 changed files with 15,051 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*-stamp
/debian/.debhelper/
/debian/*.debhelper
/debian/*.debhelper.*
/debian/debhelper-build-stamp
/debian/files
/debian/*.substvars
/debian/sonic-ztp
/doc/html
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Copyright 2016 Microsoft, Inc.
Copyright 2019 Broadcom. The term "Broadcom" refers to Broadcom Inc.
and/or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PKG := sonic-ztp
all: $(PKG)

.PHONY: doc

doc:
@doxygen doc/Doxyfile

$(PKG):
@fakeroot debian/rules clean
@fakeroot debian/rules binary-indep

clean:
@rm -rf debian/$(PKG)
@rm -f debian/$(PKG).debhelper.log
@rm -f debian/$(PKG).postinst.debhelper
@rm -f debian/$(PKG).postrm.debhelper
@rm -f debian/$(PKG).prerm.debhelper
@rm -f debian/$(PKG).substvars
@rm -f debian/debhelper-build-stamp
@rm -f debian/files
@rm -rf doc/html
@rm -f $(PKG)_*_all.deb
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[SONiC ZTP High Level Design]: https://github.com/Azure/SONiC/blob/master/doc/ztp/ztp.md
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sonic-ztp (1.0.0) unstable; urgency=low

* Initial release.

-- Rajendra Dendukuri <[email protected]> Mon, 7 Jul 2019 17:17:17 -0500
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
17 changes: 17 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Source: sonic-ztp
Maintainer: Rajendra Dendukuri <[email protected]>
Uploaders: Olivier Singla <[email protected]>
Section: devel
Priority: optional
Build-Depends: debhelper (>= 8.0.0),
dh-systemd
Standards-Version: 3.9.3
Homepage: https://github.com/Azure/sonic-ztp

Package: sonic-ztp
Architecture: all
Depends: python3,
curl,
ifupdown2 (>=1.2.8),
isc-dhcp-client
Description: Zero Touch Provisioning for switches running SONiC
8 changes: 8 additions & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
src/usr/lib/ztp/* usr/lib/ztp
src/usr/bin/* usr/bin
src/etc/dhcp/dhclient-exit-hooks.d/* etc/dhcp/dhclient-exit-hooks.d
src/etc/dhcp/dhclient-enter-hooks.d/* etc/dhcp/dhclient-enter-hooks.d
src/etc/default/ztp etc/default
src/etc/logrotate.d/* etc/logrotate.d
tests/* usr/lib/ztp/tests
src/usr/lib/python3/dist-packages/ztp /usr/lib/python3/dist-packages
12 changes: 12 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/make -f

#export DH_VERBOSE=1

%:
@dh $@ --parallel

override_dh_auto_install:
dh_systemd_enable -p sonic-ztp --name=ztp

override_dh_auto_build:

3 changes: 3 additions & 0 deletions debian/sonic-ztp.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/var/lib/ztp/tmp
/var/lib/ztp/sections
/var/run/ztp
16 changes: 16 additions & 0 deletions debian/ztp.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=SONiC Zero Touch Provisioning service
Wants=config-setup.service
After=config-setup.service interfaces-config.service

[Service]
EnvironmentFile=-/etc/default/ztp
ExecStart=/usr/lib/ztp/sonic-ztp
StandardOutput=syslog
StandardError=syslog+console
UMask=177
User=root
Group=root

[Install]
WantedBy=multi-user.target
Loading

0 comments on commit 374c9e8

Please sign in to comment.