Howdy out there in automation land! I hope everyone is doing well. A reminder... Cisco Live goes live 6/2 at 9am PDT... join us online for 2 great days at CiscoLive.com/us. I will update this blog once my session is released so you readers can check it out too! So our topic today is going to cover you "moving on up" to Action Orchestrator 5.2!!! It was just released on Friday(5/30) and I've already migrated a couple of mine and made these VODs for you.... Migrated you say? Yes... that's how it works! But before we get into that let's get our movie poster up.... hmmmm... "moving on UP"?
My kids love that movie! So here is the thing on you moving to 5.2... you have two options..
1. You: I've never installed or used AO yet
ME: Great! Start today!!! You just need to install CCS and install 5.2 directly. You are done. Don't have to read the rest
2: You: I've been running AO 5.X or 5.1.X and I am ready to upgrade!
ME: Great!!! This blog is for you. We will go through the migration that is documented here. You *cannot* upgrade directly *WITHOUT* the migration.... so please don't try :) Why a migration? Because you are moving from a single arango service to a clustered arango service.
So please note, this migration is officially documented, TAC supported... all those goodies. So you should be able to do it without worry! But... being a fairly technical thing, I thought there might be value in recording and sharing some experiences I had over the weekend of doing it. I've migrated 3x clusters to date!
So let's get started...
cd /etc/yum.repos.d/ curl -OL https://download.arangodb.com/arangodb36/RPM/arangodb.repo yum -y install arangodb3-clientFor ubuntu, follow the doc, but for CentOS you can just use the above as well.
kubectl -n <namespace> get svc | grep "arango" #this gets the name kubectl -n <namespace> edit svc pers-arangodb #this will open the editor to change itOnce you open it, look for "ClusterIP" and change it to "NodePort". Then hit ESC, and then exit and save. (colon and then wq!)
apiVersion: v1 kind: Service metadata: creationTimestamp: "2019-11-04T12:10:17Z" labels: app: pers-arangodb chart: pers-arangodb-3.4.5-1 heritage: Tiller release: action-orchestrator name: pers-arangodb namespace: ccp resourceVersion: "26215995" selfLink: /api/v1/namespaces/ccp/services/pers-arangodb uid: 8e5e3d0e-a6cc-4dd2-add6-fd0bdba2beaf spec: clusterIP: 10.106.1.231 externalTrafficPolicy: Cluster ports: - name: pers-arangodb-svc nodePort: 30308 port: 8529 protocol: TCP targetPort: pers-arangodb selector: app: pers-arangodb release: action-orchestrator sessionAffinity: None type: NodePort status: loadBalancer: {}
kubectl -n <namespace> get secret action-orchestrator-jwt-secret -o jsonpath="{.data.jwtSecret}"
echo <jwtSecret from step 5>|base64 --decode
export HTTPS_PROXY="http://myproxy.example.com:80"
#run these steps... curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash - sudo yum install nodejs #verify via node --version
#run these steps... sudo apt install nodejs npm sudo apt install build-essential #verify via node --version
#run this sudo npm config set https-proxy http://myproxy.example.com:80
npm install -g jwtgen
jwtgen -a HS256 -s <DECODED KEY from step 6> -c server_id=setup -c iss=arangodb
curl -X put http://<master IP>:<exposed NodePort>/_api/user/root -H 'Authorization: Bearer <TOKEN GENERATED FROM STEP 8>' -d '{ "passwd": "somepassword" }'
arangodump --server.endpoint tcp://<master IP or hostname>:<exposed port> --server.username root --server.password <password you set in step 8> --all-databases true --threads 4 --output-directory arango_backupI used "arango_backup" as the folder but you can call it whatever you want. It will then store the backup of your arango DB into that folder.
kubectl get pods -n <namespace> | grep action-orchestrator kubectl get services -n <namespace> kubectl get pvc -n <namespace> kubectl get pv -n <namespace>
kubectl scale deployment -n <namespace> action-orchestrator-be-lds --replicas=0 kubectl scale deployment -n <namespace> action-orchestrator-be-console --replicas=0 kubectl scale deployment -n <namespace> action-orchestrator-be-bootstrap --replicas=0 kubectl scale deployment -n <namespace> action-orchestrator-be-orchestrator --replicas=0 kubectl scale deployment -n <namespace> action-orchestrator-be-rbac --replicas=0 kubectl scale deployment -n <namespace> action-orchestrator-be-event --replicas=0 kubectl scale deploy -n <namespace> action-orchestrator-be-schedule --replicas=0 kubectl scale deploy -n <namespace> action-orchestrator-be-importexport --replicas=0
#You can then verify they are down via...
kubectl -n <namespace> get deployments | grep "action-orchestrator-be"
action-orchestrator-pers-arangodb
.kubectl -n <namespace> get secret action-orchestrator-pers-arangodb-root-password -o jsonpath="{.data.password}" | base64 --decode
arangorestore --server.endpoint ssl://<master-ip>:<port> --server.username root --server.password <password from step 16> --all-databases true --overwrite true --create-database true --replication-factor 3 --threads 4 --input-directory <backup folder from earlier>
kubectl scale deployment -n <namespace> action-orchestrator-be-lds --replicas=2
FOR i in lhtenants FILTER i.enabled==true AND i.deleted==false AND i.status.state == "migration-successful" return iYou can see most of this restore on this video....
kubectl scale deployment -n <namespace> action-orchestrator-be-console --replicas=2 kubectl scale deployment -n <namespace> action-orchestrator-be-orchestrator --replicas=2 kubectl scale deployment -n <namespace> action-orchestrator-be-rbac --replicas=2 kubectl scale deployment -n <namespace> action-orchestrator-be-event --replicas=2 kubectl scale deploy -n <namespace> action-orchestrator-be-schedule --replicas=2 kubectl scale deploy -n <namespace> action-orchestrator-be-importexport --replicas=2 #You can then verify they are down via... kubectl -n <namespace> get deployments | grep "action-orchestrator-be"NOTE: DO NOT SCALE UP BOOTSTRAP YET!
Since I've integrated the videos into the steps above... no "ONTO THE VIDEO" :( ... but its ok... look forward to an upcoming blog where we will discuss new stuff/features in 5.2!
Standard End-O-Blog Disclaimer:
Thanks as always to all my wonderful readers and those who continue to stick with and use CPO and AO! I have always wanted to find good questions, scenarios, stories, etc... if you have a question, please ask, if you want to see more, please ask... if you have topic ideas that you want me to blog on, Please ask! I am happy to cater to the readers and make this the best blog you will find :)
AUTOMATION BLOG DISCLAIMER: As always, this is a blog and my (Shaun Roberts) thoughts on CPO, AO, CCS, orchestration, development, devops, and automation, my thoughts on best practices, and my experiences with the products and customers. The above views are in no way representative of Cisco or any of it's partners, etc. None of these views, etc are supported and this is not a place to find standard product support. If you need standard product support please do so via the current call in numbers on Cisco.com or email tac@cisco.com
Thanks and Happy Automating!!!
--Shaun Roberts
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: