https://github.com/orange-cloudfoundry/mdproxy4cs
User metadata proxy server for cloudstack
https://github.com/orange-cloudfoundry/mdproxy4cs
Last synced: 6 months ago
JSON representation
User metadata proxy server for cloudstack
- Host: GitHub
- URL: https://github.com/orange-cloudfoundry/mdproxy4cs
- Owner: orange-cloudfoundry
- License: apache-2.0
- Created: 2018-12-19T21:47:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-06-23T22:12:56.000Z (about 1 year ago)
- Last Synced: 2025-06-23T23:25:07.365Z (about 1 year ago)
- Language: Go
- Size: 5.89 MB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MetaData Proxy 4 CloudStack
`mdproxy4cs` is installed in our BOSH stemcell where it is used
to abstract the complexity to access the IaaS metadata from CloudStack
needed by the bosh-agent to finalise the virtual machines' configuration.
Workflow:
- bosh-agent first boot: set up a static configuration inside the VM
- `mdproxy4cs` start!
- set up a predetermined Link-local IP address and listen on the defined port
(`MDPROXY4CS_HTTP_LISTEN`)
- discover the IaaS IP address serving the metadata
(`MDPROXY4CS_INAME`)
- bosh-agent second boot: request the VM metadata to the IaaS
through `mdproxy4cs`
## Usage
Installation example:
```sh
tempdir=$(mktemp -d)
repo="orange-cloudfoundry/mdproxy4cs"
version=$(curl -fsL "https://api.github.com/repos/${repo}/releases/latest" | sed -n -e 's/.*"tag_name":[[:space:]]*"v\([^"]*\)".*/\1/p')
name="mdproxy4cs_${version}_linux_amd64"
curl -fsL "https://github.com/${repo}/releases/download/v${version}/${name}.tar.gz" |
tar -xz -C "$tempdir"
install -m 0755 -D "${tempdir}/${name}/mdproxy4cs" /usr/bin/mdproxy4cs
install -m 0644 -D "${tempdir}/${name}/assets/default" /etc/default/mdproxy4cs
install -m 0644 -D "${tempdir}/${name}/assets/mdproxy4cs.service" /usr/share/mdproxy4cs/mdproxy4cs.service
install -m 0755 -D "${tempdir}/${name}/assets/pre-start.sh" /usr/share/mdproxy4cs/pre-start.sh
systemctl enable /usr/share/mdproxy4cs/mdproxy4cs.service
rm -rf "${tempdir}"
```
## Why?
The metadata are provided by the CloudStacks virtual routers.
Before CloudStack 4.14 (more exactly the patch:
[#3587](https://github.com/apache/cloudstack/pull/3587)
vRouter in redundant mode acquire guest IP from first IP of the tier),
the IP addresses of the vRouters was not set.
They could be found through DHCP requests,
but changed over time
(when a vRouter was recreated and the bosh-agent restarted for one case,
or the connectivity to the BOSH director is temporarily lost).
This made the process of acquiring the metadata complex and unreliable;
thus this middleware was made.
As of today, we are investigating to replace this component by a more
versatile and widely adopted one,
such as [cloud-init](https://github.com/canonical/cloud-init/).
Stay tuned for more.
## Related resources
- ,
-
()
-
-