diff options
author | Marri Devender Rao <devenrao@in.ibm.com> | 2019-03-13 16:26:46 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-25 14:57:40 +0300 |
commit | 6fd3620df6ebc3d845f3b729e01f69eabcb5a166 (patch) | |
tree | fe1aa1809a4f78e3ee9d99b8b60622314012a758 /meta-phosphor | |
parent | 824feca0fa5bfde63e953d914812f97a2e102e48 (diff) | |
download | openbmc-6fd3620df6ebc3d845f3b729e01f69eabcb5a166.tar.xz |
Add certificate manager instance for bmcweb
Added bitbake recipe to instantiate phoshor-certificate-manager
service for bmcweb certificates.
Caters for installing/replacing of bmcweb certificates.
Specifying instance arguments through env file
Tested:
1) Verified phosphor-certificate-manger instance for bmcweb
is running
2) Verified Installing, Replacing of certificates using Redfish
(From meta-phosphor rev: b0e77acb579523dfa706a545c86b1c2469692adc)
Change-Id: Ifb4c8ac7e34f57a652f72eff1a0ef568a6348124
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor')
3 files changed, 44 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config.bb b/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config.bb new file mode 100644 index 000000000..c0cea9cb8 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config.bb @@ -0,0 +1,28 @@ +SUMMARY = "Phosphor certificate manager configuration for a bmcweb service" + +PR = "r1" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/LICENSE;md5=19407077e42b1ba3d653da313f1f5b4e" + +RDEPENDS_${PN} = "phosphor-certificate-manager" + +inherit allarch + +SRC_URI = "file://env" + +do_install() { + install -D ${WORKDIR}/env ${D}/${sysconfdir}/default/obmc/cert/bmcweb +} + +pkg_postinst_${PN}() { + LINK="$D$systemd_system_unitdir/multi-user.target.wants/phosphor-certificate-manager@bmcweb.service" + TARGET="../phosphor-certificate-manager@.service" + mkdir -p $D$systemd_system_unitdir/multi-user.target.wants + ln -s $TARGET $LINK +} + +pkg_prerm_${PN}() { + LINK="$D$systemd_system_unitdir/multi-user.target.wants/phosphor-certificate-manager@bmcweb.service" + rm $LINK +} diff --git a/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config/env b/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config/env new file mode 100644 index 000000000..af4899a30 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config/env @@ -0,0 +1,12 @@ +#D-Bus object path +#example: /xyz/openbmc_project/certs/server/https +ENDPOINT=https + +#Path for the certificate file +CERTPATH=/etc/ssl/certs/https/server.pem + +#Units to restart +UNIT=bmcweb.service + +#Type of the service client/server +TYPE=server diff --git a/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb b/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb index c13a13237..70cde265a 100644 --- a/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb +++ b/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb @@ -3,3 +3,7 @@ DESCRIPTION = "Image with Phosphor, an OpenBMC framework." IMAGE_LINGUAS = "" inherit obmc-phosphor-image + +OBMC_IMAGE_EXTRA_INSTALL_append = "\ + phosphor-bmcweb-cert-config \ + " |