我希望能够监视我的应用程序容器的运行状况(CPU,RAM,磁盘空间)。 使用的技术有:Cloud Foundry和BlueMedora Bindplane。 为了进行测试,我使用的是Ubuntu 18.04的全新安装,并且运行以下命令:
sudo apt update
sudo apt upgrade -y
sudo apt install ssh -y
sudo apt install net-tools -y
sudo apt install git -y
sudo apt install git -y
sudo apt install ruby -y
sudo apt install virtualbox -y
sudo apt install jq -y
sudo apt install curl -y
wget https://github.com/cloudfoundry/bosh-cli/releases/download/v5.3.1/bosh-cli-5.3.1-linux-amd64
chmod +x bosh-cli-5.3.1-linux-amd64
sudo mv bosh-cli-5.3.1-linux-amd64 /usr/local/bin/bosh
bosh -v
然后我使用以下命令安装Bosh Lite:
mkdir -p ~/Development/bosh-virtualbox
cd ~/Development/bosh-virtualbox
git clone https://github.com/cloudfoundry/bosh-deployment
bosh create-env bosh-deployment/bosh.yml \
--state ./state.json \
-o bosh-deployment/virtualbox/cpi.yml \
-o bosh-deployment/virtualbox/outbound-network.yml \
-o bosh-deployment/bosh-lite.yml \
-o bosh-deployment/bosh-lite-runc.yml \
-o bosh-deployment/jumpbox-user.yml \
-o bosh-deployment/uaa.yml \
-o bosh-deployment/credhub.yml \
--vars-store ./creds.yml \
-v director_name=VirtualBox-Director \
-v internal_ip=192.168.50.2 \
-v internal_gw=192.168.50.1 \
-v internal_cidr=192.168.50.0/24 \
-v outbound_network_name=NatNetwork
bosh int ./creds.yml --path /admin_password
bosh -e 192.168.50.2 alias-env virtualbox --ca-cert <(bosh int ./creds.yml --path /director_ssl/ca)
export BOSH_CA_CERT=$(bosh int ./creds.yml --path /director_ssl/ca)
export BOSH_CLIENT=admin
export BOSH_CLIENT_SECRET=$(bosh int ./creds.yml --path /admin_password)
export BOSH_ENVIRONMENT=virtualbox
bosh login
curl -s -k https://192.168.50.2:25555/info | jq .
在Bindplane上,我可以创建收集器和目标,但是现在需要帮助的部分来了。 添加一个源,在源类型上选择Cloud Foundry,选择先前创建的收集器,然后我需要配置Cloud Foundry连接,并出现以下错误:(请参阅附件)
与收集器的连接超时。 提供的连接信息不完整。缺少参数:[[nozzle_api_host,喷嘴_api_用户名,喷嘴_api_密码]]。 完成令牌请求时出错