def METHOD_NAME(self, instance):
    meta_inf = os.path.join(
        instance.base_dir,
        'webapps',
        'pki',
        'META-INF')
    self.backup(meta_inf)
    self.create_meta_inf(instance, meta_inf)
    context_xml = os.path.join(meta_inf, 'context.xml')
    self.backup(context_xml)
    self.create_context_xml(
        instance,
        self.context_xml % ('server', 'pki'),
        context_xml)
    document = etree.parse(context_xml, self.parser)
    self.add_manager(document)
    with open(context_xml, 'wb') as f:
        document.write(f, pretty_print=True, encoding='utf-8')