Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RS Setup Automation using Python
Search
Aniket Maithani
November 20, 2020
Programming
33
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RS Setup Automation using Python
- RS Setup Automation using Python
Aniket Maithani
November 20, 2020
More Decks by Aniket Maithani
See All by Aniket Maithani
Wifi Captive Portal Using Raspberry Pi
aniketmaithani
1
1.2k
Property Based Testing
aniketmaithani
1
120
Testing your "TESTS"
aniketmaithani
0
100
Drupal Insights : Making Your Own Distribution
aniketmaithani
0
57
Other Decks in Programming
See All in Programming
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
160
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
320
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
3.6k
霧の中の代数的エフェクト
funnyycat
1
370
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
570
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
160
1B+ /day規模のログを管理する技術
broadleaf
0
140
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
320
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
230
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
1年で人数1.5倍、PR数5.5倍増。 品質とアウトカムはどうなったか、 何が効いたか
ike002jp
0
130
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
870
[SF Ruby Conf 2025] Rails X
palkan
2
1.2k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.1k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
270
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
340
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Prompt Engineering for Job Search
mfonobong
0
370
Transcript
Creating Replica Set (automation) using Python
Replica Set • A replica set in MongoDB is a
group of mongod processes that maintain the same data set.
Why do we need Replica Set? • High Availability •
Better Performance Image ref: https://docs.mongodb.com/manu al/_images/replica-set-read- write-operations- primary.bakedsvg.svg
PyMongo + Python • Used the following libraries along with
Python- 3.7 • PyMongo – Native Python Driver for MongDB • SSH2-Python – Substitute for Paramiko and faster compared to other libraries • Terraform – Infrastructure
Server Spawning • Using simple terraform script spawned 4 servers.
• Marked them as Primary, S2, S3 and Arbiter
Steps Involved • Setup IP of machines in /etc/hosts file
in each machine. 10.2.2.1 mongo1 10.2.2.2 mongo2 10.2.2.3 mongo3
Create RBAC in primary
Python script to generate X.509 based certificates.
Screenshots
Copy certificate in each of the machines Copy config file
(mongo.conf) update in each machine and restart the machine
Finally!!
Summary • Took me about 2 days to test this
up and run it on production. • Challenges : – Ensuring no downtime – Implementation – Security Check list • Use of TF and making collection read only • Easy flow control of the Python script • Documentation for further improvements