-
Notifications
You must be signed in to change notification settings - Fork 28
How to add files into platform
There are multiple places where you might want to add a file.
The simplest and best way is to add it into the esdc-ce repo. It will be present on all nodes and also inside mgmt01.local
VM under /opt/erigones
. The second advantage is that it will be automatically downloaded during upgrade of a new version.
You have to add it into esdc-factory repo and add/modify appropriate ansible task to place the file there. The file will be placed into newly built images (VM and USB). Additionally, we want to keep the current installations in sync with new factory changes, so you should consider adding the change also into esdc-ce upgrade dir so the change will be applied with the upgrade (we are talking here about the OS changes, not changes in /opt/erigones
, e.g. configuring a serial console inside management VM or adding a new service on a node into /opt/custom
).
Things from now onwards are not something you need to do every day because it is complicated enough to try to avoid it. The best way how to avoid it is to use the above (factory) method to add services into /opt/custom/smf
. But if you want your service to be run early enough or to be part of something bigger (e.g. network milestone), you have to take this path.
This change goes into illumos-joyent repo. Find the appropriate (newest) branch. Then:
- add
xml
descriptor and also shell script intousr/src/cmd/svc/milestone/
- add the descriptor and script into the appropriate list in
usr/src/cmd/svc/milestone/Makefile
(e.g. network-related xml intoNETSVCS
; all scripts intoSVCMETHOD
) - add to
projects/illumos/manifest
Also illumos-joyent repo.
- add file into
usr/src/cmd/nsadmin/
- add to the appropriate list into
usr/src/cmd/nsadmin/Makefile
- add to
projects/illumos/manifest
This goes into smartos-live repo, checkout the newest branch.
- place your script into
src/
(including the.sh
/.js
/.d
extension that will be automatically stripped during install) - add into
src/Makefile
:
- into
BUILT_TARGETS
- into
cp
command ininstall: all $(SUBDIRS)
target
- add into
src/manifest
(no need to add it into illumos manifest) - see as an example e.g.
fssstat
command
On a running system, this directory is non-persistent (on a ramdisk) so if you want to add or modify something here, it has to be already in the platform during boot.
The smartos-live repo again, checkout the newest branch.
- copy the file into
src/etc
- add to
src/Makefile
intoETC_TARGETS
- if you need to create a directory, see and modify the part inside
src/Makefile
whereETC_TARGETS
moved into place (add your new directory name there)
These are very special files that are templated during install phase. The most common replacement is the build number.
It's in the illumos-joyent repo.
- add/modify the
usr/src/cmd/Adm/sun/issue.in
- string
00000000T000000Z
will be replaced by actual build number - also version number is replacable, see the Makefile/scripts in that directory
After doing the modifications, you have to do things according to the repo:
-
esdc-ce
: tag a new version number (for consistency, the tag should be created in all repos - esdc-ce, esdc-factory, esdc-docs, esdc-shipment, smartos-live, illumos-joyent). After that everybody can upgrade to this version. If you want the new version to be publicly visible (e.g. in GUI after click onGet latest version
) add it to the version list. -
esdc-factory
: build a new DC version (USB image or management VMs + USB image). -
smartos-live
orillumos-joyent
: build a new SmartOS platform, then change the platform number in theesdc-factory
, download the new platform and build a new USB.
Homepage | User Guide | API Reference | Wiki