{"id":20111416,"url":"https://github.com/openstack/charm-neutron-api","last_synced_at":"2025-08-21T15:33:27.881Z","repository":{"id":66174669,"uuid":"52858802","full_name":"openstack/charm-neutron-api","owner":"openstack","description":"Juju Charm - Neutron API. Mirror of code maintained at opendev.org.","archived":false,"fork":false,"pushed_at":"2024-11-15T16:19:34.000Z","size":3559,"stargazers_count":17,"open_issues_count":0,"forks_count":34,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-07T03:50:15.626Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opendev.org/openstack/charm-neutron-api","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-01T07:55:12.000Z","updated_at":"2024-11-15T16:19:38.000Z","dependencies_parsed_at":"2023-02-20T18:00:21.822Z","dependency_job_id":"5d5453ac-2758-4ad0-a0ac-d5fd2946628d","html_url":"https://github.com/openstack/charm-neutron-api","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-neutron-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-neutron-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-neutron-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-neutron-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openstack","download_url":"https://codeload.github.com/openstack/charm-neutron-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230520392,"owners_count":18238948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T18:16:00.593Z","updated_at":"2024-12-20T01:16:40.171Z","avatar_url":"https://github.com/openstack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nThis principle charm provides the OpenStack Neutron API service which was\npreviously provided by the nova-cloud-controller charm.\n\nWhen this charm is related to the nova-cloud-controller charm the nova-cloud\ncontroller charm will shutdown its api service, de-register it from keystone\nand inform the compute nodes of the new neutron url.\n\n# Usage\n\nTo deploy (partial deployment only):\n\n    juju deploy neutron-api\n    juju deploy neutron-openvswitch\n\n    juju add-relation neutron-api mysql\n    juju add-relation neutron-api rabbitmq-server\n    juju add-relation neutron-api neutron-openvswitch\n    juju add-relation neutron-api nova-cloud-controller\n\nThis charm also supports scale out and high availability using the hacluster\ncharm:\n\n    juju deploy hacluster neutron-hacluster\n    juju add-unit neutron-api\n    juju config neutron-api vip=\u003cVIP FOR ACCESS\u003e\n    juju add-relation neutron-hacluster neutron-api\n\n## High availability\n\nWhen more than one unit is deployed with the [hacluster][hacluster-charm]\napplication the charm will bring up an HA active/active cluster.\n\nThere are two mutually exclusive high availability options: using virtual IP(s)\nor DNS. In both cases the hacluster subordinate charm is used to provide the\nCorosync and Pacemaker backend HA functionality.\n\nSee [OpenStack high availability][cdg-ha-apps] in the [OpenStack Charms\nDeployment Guide][cdg] for details.\n\n# Restrictions\n\nThis charm only support deployment with OpenStack Icehouse or better.\n\n# Internal DNS for Cloud Guests\n\nThe charm supports enabling internal DNS resolution for cloud guests in\naccordance with the OpenStack DNS integration guide. To enable internal DNS\nresolution, the 'enable-ml2-dns' option must be set to True. When enabled, the\ndomain name specified in the 'dns-domain' will be advertised as the nameserver\nsearch path by the DHCP agents.\n\nThe Nova compute service will leverage this functionality when enabled. When\nports are allocated by the compute service, the dns_name of the port is\npopulated with a DNS sanitized version of the instance's display name. The\nNeutron DHCP agents will then create host entries in the dnsmasq's\nconfiguration files matching the dns_name of the port to the IP address\nassociated with the port.\n\nNote that the DNS nameserver provided to the instance by the DHCP agent depends\non the tenant's network setup. The Neutron DHCP agent only advertises itself as\na nameserver when the Neutron subnet does not have nameservers configured. If\nadditional nameservers are needed and internal DNS is desired, then the IP\naddress of the DHCP port should be added to the subnet's list of configured\nnameservers.\n\nFor more information refer to the OpenStack documentation on\n[DNS Integration](https://docs.openstack.org/ocata/networking-guide/config-dns-int.html).\n\n# External DNS for Cloud Guests\n\nTo add support for DNS record auto-generation when Neutron ports and floating\nIPs are created the charm needs a relation with designate charm:\n\n    juju deploy designate\n    juju add-relation neutron-api designate\n\nIn order to enable the creation of reverse lookup (PTR) records, enable\n\"reverse-dns-lookup\" charm option:\n\n    juju config neutron-api reverse-dns-lookup=True\n\nand configure the following charm options:\n\n    juju config neutron-api ipv4-ptr-zone-prefix-size=\u003cIPV4 PREFIX SIZE\u003e\n    juju config neutron-api ipv6-ptr-zone-prefix-size=\u003cIPV6 PREFIX SIZE\u003e\n\nFor example, if prefix sizes of your IPv4 and IPv6 subnets are \"24\" (e.g.\n\"192.168.0.0/24\") and \"64\" (e.g. \"fdcd:06ca:e498:216b::/64\") respectively,\nconfigure the charm options as follows:\n\n    juju config neutron-api ipv4-ptr-zone-prefix-size=24\n    juju config neutron-api ipv6-ptr-zone-prefix-size=64\n\nFor more information refer to the OpenStack documentation on\n[DNS Integration](https://docs.openstack.org/ocata/networking-guide/config-dns-int.html)\n\n# Spaces\n\nThis charm supports the use of Juju Network Spaces, allowing the charm to be\nbound to network space configurations managed directly by Juju. This is only\nsupported with Juju 2.0 and above.\n\nAPI endpoints can be bound to distinct network spaces supporting the network\nseparation of public, internal and admin endpoints.\n\nAccess to the underlying MySQL instance can also be bound to a specific space\nusing the shared-db relation.\n\nTo use this feature, use the --bind option when deploying the charm:\n\n    juju deploy neutron-api --bind \\\n       \"public=public-space \\\n        internal=internal-space \\\n        admin=admin-space \\\n        shared-db=internal-space\"\n\nAlternatively these can also be provided as part of a juju native\nbundle configuration:\n\n```yaml\n    neutron-api:\n      charm: cs:xenial/neutron-api\n      num_units: 1\n      bindings:\n        public: public-space\n        admin: admin-space\n        internal: internal-space\n        shared-db: internal-space\n```\n\nNOTE: Spaces must be configured in the underlying provider prior to attempting\nto use them.\n\nNOTE: Existing deployments using os-*-network configuration options will\ncontinue to function; these options are preferred over any network space\nbinding provided if set.\n\n# Additional Middleware Requests by Neutron Plugin Charms\n\nSome neutron plugins may require additional middleware to be added to\napi-paste.ini. In order to support that a subordinate may pass extra_middleware\nvia the neutron-plugin-api-subordinate relation.\n\nRelation data to be set by subordinates:\n    {'extra_middleware': [{\n            'type': 'middleware_type',\n            'name': 'middleware_name',\n            'config': {\n                'setting_1': 'value_1',\n                'setting_2': 'value_2'}}]}\n\nIt would not be correct to do that from your own plugin as this requires the\nneutron-api service restart which should be handled in this charm.\n\nThe developer guide for Neutron contains a description of the startup process\nwhich makes it clear that api-paste.ini is parsed only once in neutron-api's\nlifetime (see the \"WSGI Application\" section):\n\nhttps://opendev.org/openstack/neutron/src/branch/master/doc/source/contributor/internals/api_layer.rst\n\nFor the api-paste.ini format in general, please consult PasteDeploy repository\ndocs/index.txt, \"Config Format\" section: https://github.com/Pylons/pastedeploy\n\nClasses in loadwsgi.py contain config_prefixes that can be used for middleware\ntypes - these are the prefixes the charm code validates passed data against:\n\nhttps://github.com/Pylons/pastedeploy/blob/master/paste/deploy/loadwsgi.py\n\n## Policy Overrides\n\nPolicy overrides is an **advanced** feature that allows an operator to override\nthe default policy of an OpenStack service. The policies that the service\nsupports, the defaults it implements in its code, and the defaults that a charm\nmay include should all be clearly understood before proceeding.\n\n\u003e **Caution**: It is possible to break the system (for tenants and other\n  services) if policies are incorrectly applied to the service.\n\nPolicy statements are placed in a YAML file. This file (or files) is then (ZIP)\ncompressed into a single file and used as an application resource. The override\nis then enabled via a Boolean charm option.\n\nHere are the essential commands (filenames are arbitrary):\n\n    zip overrides.zip override-file.yaml\n    juju attach-resource neutron-api policyd-override=overrides.zip\n    juju config neutron-api use-policyd-override=true\n\nSee appendix [Policy Overrides][cdg-appendix-n] in the [OpenStack Charms\nDeployment Guide][cdg] for a thorough treatment of this feature.\n\n# Bugs\n\nPlease report bugs on [Launchpad][lp-bugs-charm-neutron-api].\n\nFor general charm questions refer to the OpenStack [Charm Guide][cg].\n\n\u003c!-- LINKS --\u003e\n\n[cg]: https://docs.openstack.org/charm-guide\n[cdg]: https://docs.openstack.org/project-deploy-guide/charm-deployment-guide\n[cdg-appendix-n]: https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/app-policy-overrides.html\n[lp-bugs-charm-neutron-api]: https://bugs.launchpad.net/charm-neutron-api/+filebug\n[hacluster-charm]: https://jaas.ai/hacluster\n[cdg-ha-apps]: https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/app-ha.html#ha-applications\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-neutron-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenstack%2Fcharm-neutron-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-neutron-api/lists"}