A MapUI Client for CB-Tumblebug (display multi-cloud infra service)
10K+
GitHub repo: https://github.com/cloud-barista/cb-mapui
A MapUI Client for CB-Tumblebug (display multi-cloud infra service)
Check CB-Tumblebug project. (https://github.com/cloud-barista/cb-tumblebug)
[NOTE] This project is temporal and unstable, used only for demonstation purpose.
npm, node.js
ol, parcel
Check the instruction from Openlayers. https://openlayers.org/en/latest/doc/tutorials/bundle.html
npm install ol
npm install --save-dev parcel-bundler
(필요에 따라 설치, buffer, http)
npm install buffer --save
npm install http --save
npm run build
$ npm start
Server running at http://localhost:1324
✨ Built in 6.32s
# Access to http://x.x.x.x:1324/ (ex: http://localhost:1324/)
웹브라우저를 통해 http://x.x.x.x:1324 (ex: http://localhost:1324) 접속

cb-tumblebuglocalhost, 192.168.1.6, cb-tumblebug1323, 사용자가 상황에 따라 31323 등으로 변경하여 사용 가능index.js 에 포함된 로직이 수행되며, 이는 index.html 에 포함되어 표현됨.
index.js 는 Openlayers를 기반으로,
[참고] CB-Tumblebug API가 변경되는 경우 아래의 코드 수정이 필요함
var mcisOptions = {
hostname: 'localhost',
port: 1323,
path: '/ns/' + namespace + '/mcis',
method: 'GET'
};
MCIS에 포함된 VM들의 퍼블릭 IP의 기하학적 위치(longitude, latitude) 를 조회하여, 각 VM의 위치를 룩업함.
MCIS의 VM들의 위치를 모두 알게되면, 이를 하나의 연결된 도형으로 만들기 위해서 convexHull 로 정렬하여, Polygon 객체로 저장한다.
tileLayer.on('postrender', function (event) Openlayers에서 반복적으로 그래픽 출력을 수행하는 펑션이며, MCIS Polygon 객체들을 도형으로 출력한다. 이때 MCIS의 상태도 갱신하여, 정보를 함께 출력한다.
Content type
Image
Digest
sha256:8f2eca9c4…
Size
78.3 MB
Last updated
5 days ago
docker pull cloudbaristaorg/cb-mapui