
ในการบริหารจัดการดูแลระบบCisco ACI หลายคนอาจจะไม่คุ้นชินกับเมนูการเข้าใช้งานต่างในที่นี้ขอแนะนำ ACIPlugin ติดตั้งและสามารถใช้งานผ่านทาง vCenter ที่หลายคนคุ้นเคยได้เลยโดยไม่ต้องเข้าเว็บไซต์อื่นๆให้วุ้นวายโดยสามารถเข้าไปMonitor และ Create Tenant,Edit Tenant,Delete Tenant,Create App.Profile,EPG,Contract,Bridge Domain,VRF ได้ โดยขั้นตอนติดตั้งไม่ได้ยุ่งยากเลยสามารถทำตามได้ดังต่อไปนี้
ขั้นตอนในการติดตั้ง
- ทำการดาวน์โหลด ไฟล์ Plug in มาจากเว็บไซร์ cisco โดยใช้ไฟล์ 2 ไฟล์คือ ไฟล์ vcplugin-1.0.4.zip ซึ่งเป็นไฟล์สำหรับติดตั้ง ไฟล์ และ ACIPlugin-Install.ps1 ซึ่งเป็นไฟล์ Script สำหรับการติดตั้ง
Link Dowload : Software Download – Cisco Systems
2.ทำการจัดเตรียม webserver ที่เป็นhttps ที่Vcenterสามารถเข้าถึงเพื่อใช้ในการโหลดไฟล์ ไฟล์ vcplugin-1.0.4.zip ไปทำการติดตั้ง
กรณรีที่ vCenterไม่สามารถออกอินเตอร์เน็ตเพื่อเข้าสู่ webserver เพื่อโหลดไฟล์ได้ สามารถสร้างwebserverภายในบนเครื่อง windowsของเราเพื่อทำการติดตั้งได้ตัวอย่าง ในที่นี้ใช้ Nodejs เวอร์ชั่น v14.18.1 ในการทำwebserver ที่เป็นHTTPS โดยไฟล์ CA และ Key สามารสร้างจากเว็บไซต์ใดก็ได้
***********************************************************************************
const express = require(‘express’);
const fs = require(‘fs’);
const https = require(‘https’);
const path = require(‘path’);
const app = express();
const port = 2000;
const filesDirectory = ‘/webaci’;
// Configure SSL/TLS certificate and key
const options = {
key: fs.readFileSync(‘/CA-key/key.pem’),
cert: fs.readFileSync(‘/CA-key/CA.pem’)
};
app.get(‘/’, (req, res) => {
fs.readdir(filesDirectory, (err, files) => {
if (err) {
console.log(‘Error getting file list:’, err);
res.status(500).send(‘Internal Server Error’);
} else {
const fileList = files.map((file) => {
const filePath = path.join(filesDirectory, file);
const fileUrl = `/webaci/${file}`;
return `<li><a href=”${fileUrl}” download>${file}</a></li>`;
}).join(”);
const html = `
<h1>File List:</h1>
<ul>
${fileList}
</ul>
`;
res.send(html);
}
});
});
app.use(‘/webaci’, express.static(filesDirectory));
// Create HTTPS server with the SSL/TLS options
https.createServer(options, app).listen(port,’10.40.0.102′,() => {
console.log(`Server is running on https://YOUR_IP_ADDRESS:${port}`);
});
***********************************************************************************
จากโค้ดข้างต้นเป็นไฟล์ .js โดย ‘/webaci’ เป็น path ที่อยูู่ของโฟลเดอร์ที่ไฟล์ vcplugin-1.0.4.zip อยู่สามารถก็อปปี้pathบนเครื่องเรามาวางได้เลย
const options = {
key: fs.readFileSync(‘/CA-key/key.pem’),
cert: fs.readFileSync(‘/CA-key/CA.pem’)
};
ส่วนนี้ว่าง path ของไฟล์ key และ cert ที่เราเก็บไว้
https.createServer(options, app).listen(port,’10.40.0.102′,() => {
console.log(`Server is running on https://YOUR_IP_ADDRESS:${port}`);
});
ส่วนนี้เป็นการสร้าง Serverมา โดย listen(port,’10.40.0.102′,() ให้ใส่ ipของเครื่องเรา
เมื่อใช้เสร็จเราสามารถเข้าใช้งานได้ดังรูปด้านล่างโดยเข้าผ่าน https:// YOUR_IP_ADDRESS:2000 โดยเราจะให้ก็อปปี้URLสำหรับดาวน์โหลดมาเช่น https://10.40.0.102:2000/webaci/vcplugin-1.0.4.zip
3.ทำการเรียกใช้งาน script โดยทำการเปิด windows powershell มาแล้วย้าย Directory ไปยัง โฟลเดอร์ ที่เก็บไฟล์Script ACIPlugin-Install.ps1 แล้วพิมพ์ .\ACIPlugin-Install.ps1 เพื่อทำการเปิดรัน Script กรณีที่มีปัญหาดังรูปด้านล่างใช้คำสั่ง Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
4.หลังจากนั้นทำการกรอกข้อมูลโดย
4.1vCenter IP / FQDN: ใส่IP Address vCenter
4.2Plugin zip file URL: ใส่URL ไฟล์ vcplugin-1.0.4.zip เพื่อให้ vCenterโหลดไปติดตั้ง
4.3Do you accept the certificate? Enter Yes/No: Yes หลังจากนั้นจะทำการเชื่อมต่อกับvCenterและกรอกUsername และPassword ของ vCenter
ถ้าเกิดError ดังด้านล่าง ให้ใช้คำสั่ง Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
Error: Invalid server certificate. Use Set-PowerCLIConfiguration to set the value for the InvalidCertificationAction option to Prompt if you’d like to connect once or to add a permanent exception for this server.
4.4Working with multiple default servers? ให้ตอบ Y
เมื่อติดตั้งสำเร็จขึ้นดังรูปด้านล่าง
เมื่อติดตั้งเสร้จให้เข้ามายังvCenterสามารถเข้าไปที่เมนูและจะเห็น เมนู Cisco ACI Fabric สามารถกดเข้าไปล็อคอินเข้าใช้งานได้เลย