Cov txheej txheem:
- Kauj ruam 1: Sau npe/Tsim Google Cloud Platform Account
- Kauj ruam 2: Scripted Instance Creation
- Kauj Ruam 3: Tsim VM Instance
- Kauj Ruam 4: Kho Kev Sib Hloov ntawm VM
- Kauj Ruam 5: Txhim Kho Tus Tswj Xyuas Software
- Kauj ruam 6: Configuring Backups
Video: Unifi Controller ntawm Google Cloud Platform (GCP): 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Ubiquity's Unifi Controller tso cai rau kev tswj hwm lub vev xaib ntawm lawv cov khoom Unifi suav nrog cov ntsiab lus siv wireless, routers, thiab hloov pauv. Lawv muaj cov lus qhia zoo rau teeb tsa tus tswj hwm ntawm Amazon AWS siv qib dawb uas muab VM pub dawb rau 12 lub hlis. Thaum lub xyoo dhau los, koj yuav tsum tau them nyiaj txuas ntxiv siv VM.
Nruab UniFi Cloud Controller ntawm Amazon Web Services
Google Cloud Platform (GCP) kuj tseem muaj qib dawb nrog dawb micro VM ib txhis nrog cov yam ntxwv zoo ib yam rau Amazon muab. Lub hom phiaj ntawm phau ntawv qhia no yog sau cov kauj ruam rau teeb tsa Unifi Controller hauv GCP.
Nco tseg: Lwm tus neeg siv, Petri, tau sau phau ntawv qhia tau zoo ntxiv rau tsab ntawv uas teeb tsa cov yam ntxwv ntxiv xws li Cia Nkag Nkag daim ntawv pov thawj, Fail2Ban txwv, thiab kev saib xyuas dav dav. Txheeb nws txhawm rau ntxiv cov lus qhia no:
Kauj ruam 1: Sau npe/Tsim Google Cloud Platform Account
- Nkag mus rau: https://cloud.google.com/free/ thiab nyem qhov "Sim Dawb" khawm kom pib sau npe rau tus as khauj
- Nkag mus nrog koj tus account ntawm:
-
Xaiv qhov haujlwm koj xav siv rau Unifi Controller. Yog tias teeb tsa tus as khauj dawb, koj yuav muaj "Kuv thawj qhov haujlwm" xaiv.
Qhov no tuaj yeem hloov pauv los ntawm kev mus rau Ntawv qhia zaub mov> IAM & thawj coj> Chaw thiab hloov pauv Lub Npe Project
Kauj ruam 2: Scripted Instance Creation
Ntau dua li nyem los ntawm GUI ib qib zuj zus los tsim qhov piv txwv, Google muab Google Cloud Plhaub los tsim los ntawm kab hais kom ua. Qhov no tshem tawm qhov tsis raug teeb tsa tsis raug vim tsis ua raws cov kauj ruam lossis ua yuam kev.
Nco tseg: Qib Tier tsuas yog muaj nyob hauv Cov Cheeb Tsam hauv qab no: us-east1, us-west1, thiab us-central1
Yog tias siv txoj hauv kev no nrog tsab ntawv los ntawm Petri, tsis xav tau cov kauj ruam ntxiv raws li txhua yam ntxiv yog siv rau ntawm Debian. Rau cov neeg uas xav tsim nws tus kheej lossis nkag siab cov txiv ntoo thiab ntsia liaj qhov rooj tom qab lub ntsej muag, cov kauj ruam tom qab taug kev no los ntawm kev teeb tsa.
Nco tseg: Vim yog kev qhia ua qauv, qee zaum luam/muab tshuaj tsis ua haujlwm raws li qhov xav tau. Txuas nrog yog cov ntawv sau nrog txhua cov lus txib uas yuav tsum tau ua kom raug thiab muab tshuaj txhuam thiab yuav yooj yim dua los hloov kho rau koj lub npe tshwj xeeb lub npe, DNS npe, thiab thaj chaw.
Nco Ntsoov Kawg: Raws li ntawm 9/5/2018, Unifi software tseem xav tau qhov ua ntej ntawm MongoDB dua li dab tsi tau ntim nrog Ubuntu 18.04, xav tau ib qho OS txawv, lossis qee qhov kev ua haujlwm raws li tau piav qhia ntawm no. Raws li qhov tshwm sim, cov lus txib hauv qab no yuav siv Debian 9
Tom qab nkag mus rau hauv qhov chaw console, nyem lub pob nyob rau ntawm kaum sab xis saum toj kom qhib Cloud Shell. Lub thawv dub yuav tshwm nyob rau sab qis ntawm nplooj ntawv nrog Cloud Plhaub interface. Luam thiab paste cov lus txib, hloov cov ntawv raws li xav tau
Tsim kom muaj lub thoob ntim khoom
Ib lub thoob ntim khoom yuav tuav cov thaub qab hauv qhov chaw sib cais yog li peb tuaj yeem rhuav tshem tus tswj hwm thiab rov qab los ntawm qhov tsim nyog thaub qab sai sai. Nco ntsoov hloov qee qhov tshwj xeeb-lub npe nrog lub npe uas koj xaiv. Lwm thaj tsam muaj nyob hauv qib pub dawb tsuav yog lawv nyob hauv Asmeskas, tsis suav nrog peb-sab hnub tuaj 4 (Txheeb xyuas kom ntxaws ntawm no:
gsutil mb -c cheeb tsam -l peb-central1 gs: // qee qhov tshwj xeeb-npe
Tsim kom muaj IP sab nraud zoo li qub
Txhawm rau tiv thaiv tus IP sab nraud los ntawm kev hloov pauv nyob rau lub sijhawm, tus IP tuaj yeem tshwj tseg thiab tseem pub dawb yog tias nws txuas nrog VM piv txwv. Yog tias koj rhuav tshem qhov piv txwv yam tsis tsim kev hloov pauv, lossis tshem tawm nws ntau dua 1 teev, koj yuav raug them rau IP zoo li qub kom txog thaum koj rho tawm.
gcloud xam chaw nyob tsim unifi-external
-region peb-central1
Tsim Txoj Cai Firewall
Cov kab ntawm kab no yuav tsim ntau txoj cai tiv thaiv hluav taws uas xav tau rau Unifi tus tswj hwm thiab ntxiv lawv rau ib daim ntawv npe hu ua unifi-server uas tseem yuav raug xa mus rau lub server piv txwv
gcloud suav firewall-cov cai tsim "unifi-http"
-tso cai tcp: 80, tcp: 8443, tcp: 8880, tcp: 8843 / --description = "Cov chaw nres nkoj siv rau HTTP thiab HTTPS ntawm cov chaw nres nkoj uas tsis yog tus qauv" \-target-tags = unifi-server
gcloud suav firewall-cov cai tsim "unifi-inform"
-allow tcp: 8080 / --description = "Chaw nres nkoj rau kev sib txuas lus ntawm lub cuab yeej thiab tswj" \-target-tags = unifi-server
gcloud suav firewall-txoj cai tsim "unifi-stun"
--allow udp: 3478 / --description = "Chaw nres nkoj siv rau STUN" \-target-tags = unifi-server
gcloud suav firewall-txoj cai tsim "unifi-throughput"
--allow tcp: 6789 / --description = "Chaw nres nkoj siv rau UniFi mobile speed test" \-target-tags = unifi-server
Tsim VM Tus Txheej Txheem
Cov kab no yuav tsim qhov piv txwv hauv qib pub dawb. Kho kab thawj tom qab tsim los hloov lub npe ntawm qhov piv txwv. Yog tias koj tsis xav siv cov ntawv sau tsis siv neeg muab los ntawm Petri lossis xav suav nrog cov kev xaiv ntxiv, hloov kho lossis tshem tawm kab kawg pib nrog --metadata. (Nco tseg: yog tias koj tshem tawm kab tag nrho, koj yuav tsum tau nyem Enter dua tom qab muab lo ua kom tiav)
gcloud xam cov xwm txheej tsim unifi-maub los
--machine-type f1-micro / --image-family debian-9 / --image-project debian-cloud / --boot-disk-type pd-standard \-boot-disk-size 25GB / --zone us-central1-c / --description "Unifi Controller" / --coves = default, storage-rw / --tags unifi-server / --address unifi-external / --metadata = startup-script-url = gs: //petri-unifi/startup.sh, timezone = US/Central, dns-name = your.domain.com, thoob = qee qhov tshwj xeeb-npe
Yog tias koj xav siv lwm cov duab OS, koj tuaj yeem tau txais daim ntawv teev npe tag nrho los ntawm Cloud Shell siv cov lus txib hauv qab no
gcloud suav cov npe duab
Nco ntsoov Tsev Neeg thiab Txoj Haujlwm, hauv qhov no "debian-9" thiab "debian-cloud"
Kauj Ruam 3: Tsim VM Instance
- Los ntawm cov ntawv qhia zaub mov khawm nyob rau sab saud, xaiv "Compute Engine" ces "VM Instances"
- Tos rau Compute Engine kom tiav qhov pib ua ntej yog hais kom sai.
-
Hauv qab "VM Cov xwm txheej" ntawm sab laug pane, nyem "Tsim" hauv kab sab xis.
- Sau lub npe rau koj VM. Hauv qhov no "unifi-controller"
- Xaiv Ib Cheeb Tsam lossis tawm ntawm lub neej ntawd
- Hloov Tshuab Hom rau "micro" yog tias siv qhov pub dawb
-
Nyem "Hloov" ntawm Boot disk. Xaiv cov duab Ubuntu, xws li "Ubuntu 16.04 LTS"
Cov duab tshiab ntawm Ubuntu muaj qhov tsis sib xws ntawm MongoDB. Debian yog lwm txoj kev xaiv
-
Ua kom lub hom disk zoo rau Cov Neeg Siv Khoom Loj Disk thiab loj li 25 GB
Nco tseg: 30 GB yuav xav tau kom ua haujlwm tau zoo ntawm cov tswj software. Lub Huab Shell siv 5 GB thiab tuaj yeem hla qhov pub dawb tshwj tsis yog qhov piv txwv no yog 25 GB
- Tshem cov kev xaiv Firewall tsis raug xaiv. Cov no yuav raug teeb tsa tom qab.
- Yog tias teeb tsa cov thaub qab raws li tau piav qhia tom qab hauv phau ntawv qhia no, hauv qab Access Scopes, xaiv "Teeb nkag rau txhua API" thiab hloov Cia rau "Nyeem Sau"
-
Nyem "Kev tswj hwm, disks, kev sib tham, SSH qhov tseem ceeb" txuas, tom qab ntawd nyem rau Networking tab. Hauv qab "Network cim npe" nkag mus: unifi-server
Qhov no yuav raug siv thaum tsim cov cai firewall
- Nyem "Tsim" kom pib txheej txheem
- Muab ob peb feeb rau VM kev tsim kom tiav. Lub thawv ntsuab yuav tshwm rau sab laug ntawm lub npe thaum ua tiav.
-
Nyem rau Google Cloud Platform Menu> Networking> VPC Network> Firewall cov cai
-
Nyem "Tsim txoj cai thaiv phab ntsa" nyob rau sab saum toj ntawm nplooj ntawv. Yuav tsum muaj ob peb txoj cai. Lawv tuaj yeem tawg tawm rau hauv ib tus neeg txoj cai, lossis ib txoj cai kom suav nrog txhua qhov chaw nres nkoj xav tau. Cov npe ntawm cov chaw nres nkoj
- Lub npe: unifi-ports
- Lub hom phiaj cim npe: unifi-server
- Tus IP qhov txawv: 0.0.0.0/0
- Cov txheej txheem tshwj xeeb thiab cov chaw nres nkoj: tcp: 80; txc: 88 8 0. txc: 844 3. txc: 884 3. txc: 808 0. txc: 678 9. ib: 3478
- Tsim
-
-
Nyem rau Google Cloud Platform Ntawv Qhia> Networking> VPC Network> IP Chaw Nyob Sab Nraud
- Hloov txoj haujlwm tam sim no los ntawm Ephemeral rau Static txhawm rau tiv thaiv IP los ntawm kev hloov pauv sijhawm.
- Nco tseg: Yog tias qhov xwm txheej raug tso tseg, tus nqi $ 0.01/hr ib tus IP yuav raug them rau IPs zoo li qub
Kauj Ruam 4: Kho Kev Sib Hloov ntawm VM
Yog tias siv qhov piv txwv f1-micro, nws muaj peev xwm ua tau tias VM yuav khiav tawm ntawm 600 MB ram thiab tsis ua haujlwm. Txhawm rau pab nrog qhov no, teeb tsa cov ntaub ntawv sib pauv. Yog tias siv VM loj dua, qhov no yuav tsis tsim nyog. Kab lus no taug koj hla cov kauj ruam rau Ubuntu:
Configuring Swap
Cov lus txib hauv qab no tuaj yeem theej thiab muab tso rau hauv SSH ntu rau koj VM los tsim cov ntaub ntawv sib pauv thiab ua kom nws ruaj khov
sudo fallocate -l 1G /swapfilesudo chmod 600 /swapfilesudo mkswap /swapfilesudo swapon /swapfilesudo cp /etc /fstab /etc/fstab.bakecho ' /swapfile tsis muaj swap sw 0 0' | sudo tee -a /etc /fstab
Txhawm rau txheeb xyuas ntau npaum li cas lub cim xeeb tau siv, ob qho RAM thiab sib pauv, siv cov lus txib hauv qab no
laus -h
Kauj Ruam 5: Txhim Kho Tus Tswj Xyuas Software
- Nyem Ntawv Qhia> Suav Cav> VM Piv Txwv. Ntawm kab nrog tus tswj hwm VM, nyem lub pob SSH. Lub qhov rai tshiab yuav tshwm nrog thiab SSH ntu rau VM.
-
Khiav cov lus txib hauv qab no ntxiv Ubiquity repository thiab ntxiv GPG qhov tseem ceeb. Cov no tuaj yeem theej thiab muab tso rau hauv SSH qhov rai: ncha "deb https://www.ubnt.com/downloads/unifi/debian ruaj khov ubiquiti" | sudo tee -a /etc/apt/sources.listsudo apt -key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50
- Nco tseg: Tom qab hloov kho rau qhov kev tso tawm tshiab, qhov chaw yuav xiam oob qhab. Hloov kho cov ntaub ntawv sources.list kom tshem tawm # txij thaum pib ntawm kab ubnt
- sudo nano /etc/apt/sources.list
- Khiav cov lus txib hauv qab no txhawm rau hloov kho lub server chaw cia khoom thiab pib Unifi nruab: sudo apt-tau hloov tshiab apt-tau nruab unifi
- Yog tias tau txais kev tshoov siab, nias Y txhawm rau txuas ntxiv rub tawm cov pob khoom xav tau thiab teeb tsa
- Txhawm rau ua kom lub sijhawm pib pib sai dua ntawm VM, teeb tsa haveged rau kev nkag mus sai dua. Nrog haveged, thawj qhov pib ntawm Unifi thaum lub VM khau raj yuav siv sijhawm 6-10 feeb. Yog tsis muaj nws yuav siv sijhawm 20-25 feeb.
- Thaum ua tiav, ntaus tawm kom kaw SSH ntu
- Hauv VM Tus Txheej Txheem Qhov rai, sau tseg ntawm IP sab nraud ntawm VM
-
Qhib lub vev xaib mus rau https:// Sab nrauv-IP: 8443/
hloov Sab Nraud-IP nrog Tus IP Sab Nraud ntawm koj li VM
-
Yog tias lub vev xaib tshwm sim, teeb tsa tus tswj tau ua tiav.
Nco tseg: Kauj Ruam 2 yuav tsis pom ib qho khoom siv li tus tswj hwm tsis nyob hauv tib lub subnet ib yam li cov khoom siv. Saib Ubiquity tsab xov xwm ntawm Txheej 3 Adoption
Kauj ruam 6: Configuring Backups
Raws li ib feem ntawm Google Free Tier, 5 GB ntawm kev cia hauv cheeb tsam suav nrog. Los ntawm kev tsim lub thoob ntim khoom thiab teeb tsa Unifi los theej cov thaub qab rau hauv lub thoob no, cov ntaub ntawv tsis yog tsuas yog khaws cia hauv lub cav suav, tso cai rau rov ua dua yog tias tag nrho qhov xwm txheej tsis muaj.
Tsim Google Cloud Storage Bucket
- Hauv GCP Console, nyem rau khawm Ntawv qhia zaub mov nyob rau sab saud sab sauv, xaiv "Cia" nyob hauv qab Cov lus khaws cia, tom qab ntawd nyem Tsim Thoob
-
Sau lub npe uas tsis yog thoob ntiaj teb Tsim thaum ua tiav Xaiv ib cheeb tsam.
- Hauv Asmeskas, kev cia dawb muaj nyob hauv cov cheeb tsam xaus rau 1 raws li tau sau tseg ntawm no:
- Xaiv Cheeb Tsam rau qib dawb
- Nyem Txuas ntxiv thaum ua tiav
- Hauv GCP Console, nyem lub pob Ntawv qhia zaub mov nyob rau hauv kaum sab saud, xaiv "Compute Engine", tom qab ntawd nyem VM qhov xwm txheej
- Nres qhov piv txwv Unifi
- Nyem rau ntawm lub npe piv txwv, thiab xaiv Kho Kom Zoo Dua Hauv "Access Scopes", xaiv "Set Access for each API"
- Hloov "Cia" Nyeem Sau
- Pib qhov piv txwv
Tsim ib tsab ntawv los theej cov thaub qab rau hauv lub thoob txhua hnub
- Siv cov lus txib hauv qab no los tsim tsab ntawv thaub qab, ua kom hloov chaw [name_of_storage_bucket] nrog lub npe koj tsim saum toj no. ncha '#!/bin/sh' | sudo tee /etc/cron.daily/unifi-backup-to-bucket echo sudo gsutil rsync -r -d/var/lib/unifi/thaub qab gs: // [name_of_storage_bucket] | sudo tee -a /etc/cron.daily/unifi-backup-to-bucket
- Teem cov ntaub ntawv ua tiav sudo chmod +x /etc/cron.daily/unifi-backup-to-bucket
- Tam sim no cov ntaub ntawv thaub qab yuav tsum tau theej rau hauv lub thoob txhua hnub. Koj tuaj yeem saib cov ntaub ntawv los ntawm kev mus rau Chaw Cia> Browser thiab nyem lub thoob.
Nco tseg: Kuv muaj qee qhov teeb meem nrog kev luam cov ntawv los ntawm Cov Ntawv Qhia thiab muab tso rau hauv lub console tsis ua haujlwm tag nrho. Cov ntawv yuav theej, tab sis cov lus txib yuav tsis ua kom raug. Ntsuas lawv tus kheej los kho qhov teeb meem.
Pom zoo:
Plotting Real-time Graph ntawm Android Los Ntawm Arduino Los Ntawm HC-05: 3 Cov Kauj Ruam
Plotting Real-time Graph ntawm Android Los ntawm Arduino Los ntawm HC-05: Hav nyob ntawm no, ntawm no yog kev qhia qhia yuav ua li cas npaj cov phiaj xwm ntawm lub sijhawm tiag tiag ntawm qhov tseem ceeb los ntawm tus tswj hwm micro xws li Arduino rau lub app. Nws siv Bluetooth qauv xws li HC-05 los ua lub cuab yeej xa xov mus rau kis thiab tau txais cov ntaub ntawv ntawm Ar
Xa Cov Ntaub Ntawv mus rau AskSensors IoT Platform Los Ntawm Lub Vev Xaib: 6 Cov Kauj Ruam
Xa Cov Ntaub Ntawv mus rau AskSensors IoT Platform Los ntawm Lub Vev Xaib: Kuv tau tshaj tawm tsis ntev los no cov lus qhia qhia ib qib zuj zus qhia kom txuas ESP8266 ntawm MCU rau AskSensors IoT Platform. Kuv tau txais qee cov lus tawm tswv yim los ntawm cov neeg xav paub ntau ntxiv hauv AskSensors platform, tab sis lawv tsis muaj lub node MCU hauv tes. Qhov no kuv
Tsim thiab Ua tiav ntawm Cov Txheej Txheem ntawm Kev Taw Qhia ntawm Photovoltaic Panels: 5 Cov Kauj Ruam
Tsim thiab Ua kom tiav ntawm Cov Txheej Txheem ntawm Kev Taw Qhia ntawm Photovoltaic Panels: Tsim thiab Ua tiav ntawm Cov Txheej Txheem ntawm Kev Taw Qhia ntawm Photovoltaic Panels
Kev tswj hwm tus kheej ntawm RPM ntawm Lub Cav Siv Lub Tswv Yim Los Ntawm IR Raws Li Tachometer: 5 Cov Kauj Ruam (nrog Duab)
Kev Tswj Tus Kheej ntawm RPM ntawm Lub Cav Siv Lub Tswv Yim Los Ntawm IR Raws Lub Tachometer: Muaj ib txwm xav tau rau kev siv tshuab txheej txheem, ua nws yooj yim/tsis txaus ntseeg. cov txheej txheem rau dej/siv dej rau peb daim av me me.Qhov teeb meem ntawm tsis muaj kab khoom siv tam sim no
Zaub Cov Duab Tawm ntawm PSP/Lub Xov Tooj Ntawm Lub Xov Tooj Ntawm Digital Duab: 3 Kauj Ruam
Zaub Cov Duab Tawm PSP/Lub Xov Tooj Ntawm Lub Xov Tooj Ntawm Tus Duab: Zoo … lub npe hais tias txhua yam tiag tiag … Qhov no yog qhov qhia tau yooj yim heev thiab nws tsis xav tau kho vajtse lossis software ntau dua li koj yuav tsum muaj ! Cov Lus Nug Qhia Rau Kuv lossis Tawm Tswv Yim! Koj tsis tas yuav hloov kho kom ua