diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..d021e220 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,98 @@ +--- +name: CI +on: + workflow_dispatch: + pull_request: + branches: + - master + +env: + VIRL_HOST: '${{ secrets.VIRL_HOST }}' + VIRL_USERNAME: '${{ secrets.VIRL_USERNAME }}' + VIRL_PASSWORD: '${{ secrets.VIRL_PASSWORD }}' + VMANAGE_ORG: '${{ secrets.VMANAGE_ORG }}' + VMANAGE1_IP: '${{ secrets.VMANAGE1_IP }}' + VSMART1_IP: '${{ secrets.VSMART1_IP }}' + VBOND1_IP: '${{ secrets.VBOND1_IP }}' + HQ_EDGE1_IP: '${{ secrets.HQ_EDGE1_IP }}' + SITE1_EDGE1_IP: '${{ secrets.SITE1_EDGE1_IP }}' + SITE2_EDGE1_IP: '${{ secrets.SITE2_EDGE1_IP }}' + VPN0_GATEWAY: '${{ secrets.VPN0_GATEWAY }}' + ANSIBLE_VAULT_PASSWORD: '${{ secrets.ANSIBLE_VAULT_PASSWORD }}' + +jobs: + test_19_2_1: + runs-on: self-hosted + concurrency: hq2 + env: + VIRL_LAB: 'sdwan-devops-hq2' + VIPTELA_VERSION: '19.2.1' + CLOUDINIT_TYPE: 'v1' + IOSXE_SDWAN_IMAGE: 'iosxe-sdwan-16.12.2r' + CSR1000V_IMAGE: 'csr1000v-170101' + + steps: + - name: Checkout Inventory + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Install PIP requirements + run: pip install -r requirements.txt + - name: Clean Existing Deployment + run: ansible-playbook -i inventory/hq2 clean-virl.yml --tags delete + - name: Install Licenses + run: | + mkdir licenses + echo $ANSIBLE_VAULT_PASSWORD > vault-password-file + ansible-vault decrypt --vault-password-file vault-password-file files/serialFile.viptela --output licenses/serialFile.viptela + - name: Build CA + run: ansible-playbook -i inventory/hq2 build-ca.yml + - name: Build VMware + run: ansible-playbook -i inventory/hq2 build-virl.yml + - name: Configure Control Plane + run: ansible-playbook -i inventory/hq2 config-virl.yml + - name: Deploy Edges + run: ansible-playbook -i inventory/hq2 deploy-virl.yml + - name: Wait for Edges to Sync + run: ansible-playbook -i inventory/hq2 waitfor-sync.yml + - name: Check SD-WAN + run: ansible-playbook -i inventory/hq2 check-sdwan.yml + - name: Cleanup + run: ansible-playbook -i inventory/hq2 clean-virl.yml --tags delete + test_20_3_2: + runs-on: self-hosted + concurrency: hq2 + env: + VIRL_LAB: 'sdwan-devops-hq2' + VIPTELA_VERSION: '20.3.2' + CLOUDINIT_TYPE: 'v1' + IOSXE_SDWAN_IMAGE: 'iosxe-sdwan-16.12.2r' + CSR1000V_IMAGE: 'csr1000v-170101' + steps: + - name: Checkout Inventory + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Install PIP requirements + run: pip install -r requirements.txt + - name: Clean Existing Deployment + run: ansible-playbook -i inventory/hq2 clean-virl.yml --tags delete + - name: Install Licenses + run: | + mkdir licenses + echo $ANSIBLE_VAULT_PASSWORD > vault-password-file + ansible-vault decrypt --vault-password-file vault-password-file files/serialFile.viptela --output licenses/serialFile.viptela + - name: Build CA + run: ansible-playbook -i inventory/hq2 build-ca.yml + - name: Build VMware + run: ansible-playbook -i inventory/hq2 build-virl.yml + - name: Configure Control Plane + run: ansible-playbook -i inventory/hq2 config-virl.yml + - name: Deploy Edges + run: ansible-playbook -i inventory/hq2 deploy-virl.yml + - name: Wait for Edges to Sync + run: ansible-playbook -i inventory/hq2 waitfor-sync.yml + - name: Check SD-WAN + run: ansible-playbook -i inventory/hq2 check-sdwan.yml + - name: Cleanup + run: ansible-playbook -i inventory/hq2 clean-virl.yml --tags delete diff --git a/files/serialFile.viptela b/files/serialFile.viptela new file mode 100644 index 00000000..4f5a243c --- /dev/null +++ b/files/serialFile.viptela @@ -0,0 +1,121 @@ +$ANSIBLE_VAULT;1.1;AES256 +30376333363836383735333734363264346465656564363138663965386237666533373130356537 +3766643133623263666336306131353931613530316166630a366132626334353866306262633830 +61656264313533313535383134663763393134306665323631356234326636663238633864643936 +6562396362386632310a323634653362313766663561333765323838653532353631323635336233 +33393332383363353666316639663331313961666334303261373038326530613835386137306337 +64326662663064366563353531323231356233373666613961323130356561353438663462343938 +34646663643431663864393137363666346163356264356132333235396336343933643637346262 +35313063373862613763633034616332323263636565316132623363663234336637663836366332 +32333335353735383932386165636465356633343566326636323061653364363461356235393866 +39306332626238326465353135346330643231353033376466373132356462393566383932386136 +36383330303731623963313262383432636232333163666637383234323061663065653965353030 +31393763336462313164363265636630323464663433646434303365643939303761356439303565 +62646261633965633832303939303838623039656466353466316666306335326130613131353863 +64396631336637343036613838383739333862333030326235613962643464663934323037343161 +61346531393164633133616130386263393133396337343138383938623034303562613234333433 +38366333326464356538386136633435306339316636396632386534366439313964353961363863 +38633263613131633962396233613165643266303332353739393433636236656136626261366639 +63666534316463303362663163646461336434613034366166653530376133323732323630643335 +35616662643837663436643961663738353239323866663663646435383662323063393833386666 +31323163336335346162373838633764616436356166303534396337316565653238353934393763 +30366261313866666632323231323535623164633835396431366531633264623832653066666439 +64303066313462306638323961363238623163626432336537383561653634383732356638343833 +64653430666432303538333633326639393063383039336435646539336265383961396430303663 +34653432653032643365393034363632366139383638356365306137663738616339666364306666 +34323462626233383661623438666366393461633235666339313232613064326534616163646431 +30633764653761393063663039346462316361326463323861306436346336653166336564633930 +30663361643131306665393431396134336235366137393530616430326438613138376236396466 +32373664356436323065616533623964373936366339623132356535623431363161306561313166 +62376634396633626233656666326638666461313936643336313036323036386563626232613964 +64663264306361616335616233303666356366393136346332396433663633316163373630386232 +36643637306433383564316538383132363033343563663536646463333836376135643733343465 +61303834356131343234613936373066343233363531383865346131636461353530396466303930 +62373336383836386538663132313437336431633232363732306665383739663937323534303632 +30363533623430626439376265633834323564373934386262356164316165383132356361316434 +34396366383030313631323662653164663136633564656435363137616661633332643531386631 +39633138373334616236393831623966346137663763643863646638346431666261653361393938 +39383162353535336337663136656432323331633135643837333364303661616462356139326231 +37363337623362356565363865643133373031636464323032313866316132623232643338363063 +65316133356437306365333837363233636232396137306661633539616234386230316163613738 +61373238343632363038373637626263623236393738653230333962373362303765346434646130 +34326432616438373463326230663831323630363538316636303736663436343434323863386631 +61366437643335363533316635346538393730643961376132383763643739386666373135376664 +64623338303839346662306564613232353435663462626165316136643039663038383564393831 +35336361363161373166663030363031366138386464663161326533633037383230663466313664 +38353639373134643263343330666331383038343761623665616662313931616139646462653066 +33306238363837363261616631363437623339613533333965316466313538306464643664643033 +62393338313231303338303037376164313133306163623766663839643164323339373035653630 +65363662343364626336646366346138383432666538343266376130363532613131366531663232 +38383837636537663634663666326663383163363034366363653461386331343566366633303234 +64643636323566613034636562346331633633623762353330323766383738393366656330313437 +34333938666236393964383237376535393531353464316265626237306565643433306130343132 +65653434353334623463643163333362373330623964636365643365613766613930396566663264 +37353434386263663865373663623433613237323436663564303538366565633534323465653134 +64376433663064653064366133313466613961303563383537383364643833313935653831313731 +37316530643366623533643564323638313038393564643735373538623238376530366339623761 +63613263653332336630306661623931383635313230646566386266636632643939396330323830 +34303236333733373837663835386138396630376133346639353839386663306131666666313866 +63663364666662386534313565663464643635373564616534623565633063646432333737666638 +36313636663337666232373839316432306461383030356563343739643963303533383332656239 +36373064633339376261366637623336623133376365343236326363623132346161663762373936 +64333734303161356361363164323465353331653239383064613363643566636662363266386337 +64303437633931666239646338613533643334346139646137303636336466663737353331396231 +63663035336561323633316461313033623861366137643963373230396639613530613262353239 +34366635323863333066316163383235343865303862326463643634356663323035326636306262 +37643635316261313262616466643662656261383633316461343361646132613664383463303636 +30613238313137363963633330633666303138653335636432363537313764616431313864313638 +66626330306138633236333862383234386533656432666531323934356233363835386565616561 +30383433356565636465353066353465343032303239363736376438663133653236653762353130 +39653161346664353736636463363137396364663131316436656265313961396661346434666335 +35663434303062316536613237336261616330633038616461383635636534643634323361356461 +32323732646663333938323536306334643035626336393336633166396339656135626639393736 +64633334386437303030613430346665383739666137383864363338353136616231376330336530 +61336433383630383761383738393061306337313230323139313962623538356633373935346564 +37353539353937303338623938383764666333336539343331333533666466663062626233336137 +33626530306439313365373537653236383735653864633635656238353130343763396432646562 +37663632353263633335623064333161326439363639353666383334343661643838383135633962 +62666234616539663664313639663331646339393065636561333764636664316165303564616466 +66373235666132363538313366613636383032326239666663336430633732653931373962366235 +30363137316165303933356461303565653061366563303734633931353336383932613138653933 +33633965666232346335333732623466346232653637636631313332633661343962373130303934 +63383739336466653832373338366236396661363861313334336435303837663735623066366434 +39623935343962326531306334346134636639373836666331353138343836633933356563613636 +35613463623066373739363930623863333138626265303330646539336462376636373361643864 +33653235613161393236356633396462663432346461663130323365663938383532373965633737 +32336333383439666232393664643131653033653135396336646139396664333633363938336261 +32373237313631633639303162626133303735353837303735636530323764306537356461396132 +63646337616635303031623638663631666164386434656531356133376233363534613563613534 +64663639363733653933316139643764613233636263383430616236353734376561373735376434 +63303762313535633964333631626364363231633663313865303938353663636436626432613339 +36313531323562393535356366613136356136336536313630393263336536373665653035386536 +64646139633534633163623631343365623332373139353363323537653836383635366361616462 +34643662323362373532613737396536363563363435626639323333343037613033623565613338 +61353865376431653833393435326666303865303636663734313864633538373138323739613633 +34366431313430336435333563663032663735366664376663376266356630363063643466303136 +37333464636434623338643165393138343839643931353136363963623139383532383863353839 +30383336396265653333633365643262623235623330343236393964333261656132373464663136 +65376534346661343065626662333337353363313331343063333232653066656633303064393830 +38653662356433346630393432333666376136643061356630353961313763643232363734383937 +33626565323233656464636464633464346563343438366334313337333136353261313532376634 +32386232363366376332383630323764373563643132393834313363656137626666623163336535 +66626335653862316466303235376461363532633363376336643831623436366361393431393865 +39636266373863633433353132363030386135646362643133333038396233386431373136663366 +32663164613234326539373765363164643037626564616437643965366234393630393735383039 +38346133663635373230636265383164333161393034383138663735616339396336313066636466 +66303565316533336536373363383061383231656461366166646236313563343037396431343162 +38396336333866663761306139326232623634303461326135646264393135303138336664663261 +63633031316539306565653839623236383163376564613133373366376161303166623332633432 +32313132666334623162383635316362386530373336323032666530613664663431383836653931 +38666463333939356339363135346438303430636235626565346230393338653961613965623131 +66646564393663363662386139316564393265353963653961366536386638323362326135613366 +39343762383634313331373833643836306339353338333464363136343237616161653830363363 +30383164343664626261623261653362646566363031623333363533313265306137346432643834 +39326665373064373438353930333264363061613134623434303662613462633363356333613363 +31343561623931363931653866306532643433613232366133333437326166316631616537643531 +61616636376564666434613365393663333062383730616164643865663236386561396263626363 +66663832613564616361333434636634626134373861616636656538623436356265643233386635 +33366534393063646133386236663738343963313761366361396237343636333437363937346437 +65666534366531663965623262636135373339323262333232343332353830356435323438373437 +64356662633337653731656462343739333531303236656335393631373865363634663766383261 +34363434643138303932 diff --git a/group_vars/all/local.yml b/group_vars/all/local.yml index ddf8e1e6..7d7c233d 100644 --- a/group_vars/all/local.yml +++ b/group_vars/all/local.yml @@ -6,7 +6,7 @@ ansible_user: "{{ vmanage_user }}" ansible_password: "{{ vmanage_pass }}" sdwan_serial_file: "{{ playbook_dir }}/licenses/serialFile.viptela" sdwan_cert_dir: "{{ lookup('env', 'PWD') }}/myCA" -csr1000v_image: "{{ lookup('env','CSR1000V_IMAGE') | default('csr1000v-170301a', true) }}" +csr1000v_image: "{{ lookup('env','CSR1000V_IMAGE') | default('csr1000v-16.12.02r', true) }}" ubuntu_image: "{{ lookup('env','UBUNTU_IMAGE') | default('ubuntu-18-04', true) }}" # Encrypt/Vault this in real life sdwan_CA_passphrase: Cisc0123