57

MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more
Page 2: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

●●●

○○○

Page 3: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

●●

Page 4: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

●●

●●

Page 5: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more
Page 6: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

●●

○○○○

●●

Page 7: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

●○○○

Page 8: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

●○○○

Page 9: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more
Page 10: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"base-packages": { "name-prefix":"TrueOS", "depends": {

"runtime": {"uclcmd": {

"origin": "devel/uclcmd","version": ">0"

} }

} }

Page 11: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"base-packages": { "name-prefix":"TrueOS", ← Changes PREFIX of base OS packages "depends": { ← Used for dependency injection

"runtime": {"uclcmd": {

"origin": "devel/uclcmd","version": ">0"

} }

} }

Page 12: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"base-packages": { "name-prefix":"TrueOS", "depends": {

"runtime": { ← Selected {FreeBSD|TrueOS}-runtime"uclcmd": { ← Setup new dependency

"origin": "devel/uclcmd","version": ">0"

} }, "runtime-development": {

"llvm70": {"origin": "devel/llvm70","version": ">0"

} }

Page 13: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"base-packages": { "world-flags":{

"default": ["WITHOUT_SENDMAIL=yes","WITHOUT_PORTSNAP=yes"

] }

}

Page 14: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"base-packages": { "world-flags":{ ← Flags to pass into buildworld

"default": ["WITHOUT_SENDMAIL=yes","WITHOUT_PORTSNAP=yes"

] }

}

Page 15: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"base-packages": { "world-flags":{ ← Flags to pass into buildworld

"default": [ ← Conditional, “default” is special"WITHOUT_SENDMAIL=yes","WITHOUT_PORTSNAP=yes"

] }

}

Page 16: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"base-packages": { "world-flags":{ ← Flags to pass into buildworld

"default": [ ← Conditional, default always enabled"WITHOUT_SENDMAIL=yes","WITHOUT_PORTSNAP=yes"

],"WITH_TRUENAS": [ ← Conditional, used if WITH_TRUENAS is set

"WITHOUTH_BLUETOOTH=yes",]

} }

Page 17: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"base-packages": { "kernel-flags":{ ← Flags to pass into buildkernel

"default": ["WITHOUT_AUTOFS=yes",“WITHOUT_CUSE=yes"

],"WITH_TRUENAS": [

"WITHOUT_IPFILTER=yes"]

} }

Page 18: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more
Page 19: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"type":"git","url":"https://github.com/trueos/trueos-ports","branch":"trueos-master","make.conf":{

"default": ["sysutils_tmux_UNSET=DOCS EXAMPLES"

],"WITH_TRUENAS":[

"archivers_cabextract_UNSET=DOCS"]

} }

Page 20: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"type":"git", ← Where to get ports tree? Can be {git|svn|tar|null}"url":"https://github.com/trueos/trueos-ports","branch":"trueos-master","make.conf":{

"default": ["sysutils_tmux_UNSET=DOCS EXAMPLES"

],"WITH_TRUENAS":[

"archivers_cabextract_UNSET=DOCS"]

} }

Page 21: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"type":"git", ← Where to get ports tree? Can be {git|svn|tar|null}"url":"https://github.com/trueos/trueos-ports", ← Git/SVN Location, Tar File, or Directory"branch":"trueos-master","make.conf":{

"default": ["sysutils_tmux_UNSET=DOCS EXAMPLES"

],"WITH_TRUENAS":[

"archivers_cabextract_UNSET=DOCS"]

} }

Page 22: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"type":"git", ← Where to get ports tree? Can be {git|svn|tar|null}"url":"https://github.com/trueos/trueos-ports", ← Git/SVN Location, Tar File, or Directory"branch":"trueos-master", ← Git/SVN Only"make.conf":{

"default": ["sysutils_tmux_UNSET=DOCS EXAMPLES"

],"WITH_TRUENAS":[

"archivers_cabextract_UNSET=DOCS"]

} }

Page 23: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"type":"git", "url":"https://github.com/trueos/trueos-ports", "branch":"trueos-master","make.conf":{ ← Port make options

"default": ["sysutils_tmux_UNSET=DOCS EXAMPLES"

],"WITH_TRUENAS":[

"archivers_cabextract_UNSET=DOCS"]

} }

Page 24: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"type":"git", "url":"https://github.com/trueos/trueos-ports", "branch":"trueos-master","make.conf":{ ← Port make options

"default": ["sysutils_tmux_UNSET=DOCS EXAMPLES"

],"WITH_TRUENAS":[

"archivers_cabextract_UNSET=DOCS"]

} }

Page 25: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"type":"git", "url":"https://github.com/trueos/trueos-ports", "branch":"trueos-master","make.conf":{

"default": [ ← Conditional - default always enabled"sysutils_tmux_UNSET=DOCS EXAMPLES"

],"WITH_TRUENAS":[ ← Conditional only used if WITH_TRUENAS is set

"archivers_cabextract_UNSET=DOCS"]

} }

Page 26: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"type":"git", "url":"https://github.com/trueos/trueos-ports", "branch":"trueos-master","make.conf":{

"default": ["sysutils_tmux_UNSET=DOCS EXAMPLES","archivers_cabextract_UNSET=DOCS" ← Add new JSON string for each line

],"WITH_TRUENAS":[

"archivers_cabextract_UNSET=DOCS"]

} }

Page 27: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"build-all":false,"build":{

"default":["sysutils/ipmitool","sysutils/dmidecode","sysutils/tmux"

],"WITH_TRUENAS": [

"archivers/cabextract"]

}, “local_source”:”/usr/project-source” }

Page 28: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"build-all":false, ← Full Ports build"build":{

"default":["sysutils/ipmitool","sysutils/dmidecode","sysutils/tmux"

],"WITH_TRUENAS": [

"archivers/cabextract"]

}, “local_source”:”/usr/project-source” }

Page 29: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"build-all":false,"build":{ ← Which ports to build or verify

"default":["sysutils/ipmitool","sysutils/dmidecode","sysutils/tmux"

],"WITH_TRUENAS": [

"archivers/cabextract"]

}, “local_source”:”/usr/project-source” }

Page 30: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"build-all":false,"build":{

"default":[ ← Conditional, default always enabled"sysutils/ipmitool","sysutils/dmidecode","sysutils/tmux"

],"WITH_TRUENAS": [

"archivers/cabextract"]

}, “local_source”:”/usr/project-source” }

Page 31: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"ports":{"build-all":false,"build":{

"default":["sysutils/ipmitool","sysutils/dmidecode","sysutils/tmux"

],"WITH_TRUENAS": [

"archivers/cabextract"]

}, “local_source”:”/usr/project-source” ← Sources for inside poudriere build }

Page 32: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

.if exists(/usr/local_source/${PORTNAME})PORTVERSION!= git -C /usr/local_source/${PORTNAME} log -1 --pretty=format:%ctEXTRACT_ONLY=WRKSRC= /usr/local_source/${PORTNAME}.elseUSE_GITHUB= yesGH_ACCOUNT= freenasGH_PROJECT= freenasGH_TAGNAME= 1ebae666066174638bb4d4f42cbec0f497b337ae.endif

Page 33: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more
Page 34: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"iso":{"file-name":"TrueOS-x64-%%TRUEOS_VERSION%%-%%GITHASH%%-%%DATE%%","overlay":{

"type":"git","url":"https://github.com/trueos/iso-overlay","branch":"master"

},}

Page 35: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"iso":{ "prune":{

"default": ["/usr/local/share/examples","/usr/local/include"

],"WITH_TRUENAS": [

"/usr/share/examples","/usr/include"

] },

}

Page 36: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"iso":{ "iso-packages":{ ← Packages to pre-install into ISO image

"default": ["sysutils/ipmitool","sysutils/dmidecode","sysutils/tmux"

],"WITH_TRUENAS": [

"archivers/cabextract"]

},}

Page 37: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"iso":{ “dist-packages":{ ← Package .txz files to have available on media

"default": ["sysutils/ipmitool","sysutils/dmidecode","sysutils/tmux"

],"WITH_TRUENAS": [

"archivers/cabextract"]

},}

Page 38: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"iso":{ "auto-install-packages":{ ← When using TrueOS Installer - Packages to install

"default": ["sysutils/ipmitool","sysutils/dmidecode","sysutils/tmux"

],"WITH_TRUENAS”: [

"archivers/cabextract"]

},}

Page 39: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"iso":{ “install-script":"", ← Launch alternative installer

"auto-install-script":"","post-install-commands": [

{"chroot":true,"command":"touch /root/inside-chroot"

},{

"chroot":false,"command":"touch /root/outside-chroot"

} ]}

Page 40: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"iso":{ “install-script":"",

"auto-install-script":"", ← Use pc-sysinstall for fully unattended installation"post-install-commands": [

{"chroot":true,"command":"touch /root/inside-chroot"

},{

"chroot":false,"command":"touch /root/outside-chroot"

} ]}

Page 41: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"iso":{ “install-script":"",

"auto-install-script":"","post-install-commands": [ ← When using TrueOS installer, commands to run at end

{"chroot":true,"command":"touch /root/inside-chroot"

},{

"chroot":false,"command":"touch /root/outside-chroot"

} ]}

Page 42: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more
Page 43: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

"pkg-repo": { "url":"https://pkg.trueos.org/pkg/unstable/${ABI}/latest", "pubKey": [

"-----BEGIN PUBLIC KEY-----",“......”,“......”

]

}

Page 44: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more
Page 45: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

/usr/obj/usr/src/amd64.amd64/pkgset/

/usr/obj/usr/src/amd64.amd64/release/

Page 46: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

●●●

Page 47: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more
Page 48: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

● The majority of changes were centered around the following files:○ Makefile.inc1

■ Changes mostly to package creation target, injecting dependencies■ Target added which runs poudriere and combines resulting packages back into

single repo for signing○ release/release-trueos.sh

■ Helper script■ Contains logic for poudriere setup and execution■ JSON parsing routines and logic■ ISO directory creation and manipulation

○ release/Makefile■ New “make iso” target to build TrueOS image, bypassing dist-files and focus

primarily on pkg-base driven image○ release/packages/*.ucl

■ Hard-coded a few packages depends, such as pkg, jq and uclcmd.

Page 49: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

● In 2018 CI testing shouldn’t be an afterthought● With TrueOS - Jenkins is our current CI system● TrueOS ships with pre-defined “Pipelines” for a

variety of CI jobs● Pipelines all exist in the Jenkins/ subdirectory of

world sources

Page 50: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more
Page 51: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

● Pipelines are broken into the following stages○ Checkout○ Nullfs○ World○ Kernel○ Base Packages○ ISO○ Dist○ Artifact○ Publish

● Keys / Publish settings will need to change to your specific needs● Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job

Page 52: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

● With ports / packages all being “equal” there are more opportunities to slim the base system today

● Some of the following may be good candidates to remove in favor of port versions○ sendmail○ svnlite○ ntpd○ ssh○ <gasp> clang○ Probably much more!

Page 53: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more
Page 54: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more
Page 55: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

● Additional ISO customization options○ Ability to control installation dialog options via JSON○ Custom install logic?

● Base package “sets” for host / jails○ Beyond Runtime/Development/Debug○ User-defined via JSON?

● Further enhancements to compiler-bootstrap○ /etc/ knobs for setting default?

● Integration into VM / LiveCD build targets

Page 56: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

Martin WilkeJoe MaloneyKen Moore

Eric Turgeon

A very special Thank-You!

Page 57: MeetBSD California 2018 -  · Once modified, you can import these pipeline files into any Jenkins Git or MultiBranch job With ports / packages all being “equal” there are more

Thank You!

References:

https://github.com/trueos/trueos/

https://github.com/trueos/trueos/release/trueos-manifest.json