This article is a reminder that I leave to learn the DevOps technique, working for a team that usually employs waterfall development. I would appreciate it if you could read it to kill time. ** * Sorry, the content is not always correct ... **
DevOps removes the previously siled barrier between the two development and operations teams. In some organizations, engineers may even play both roles without separating the development and operations teams. DevOps works together with two teams to optimize both developer productivity and operational reliability. Reference: What is AWS DevOps?
I have no experience with a project that is big enough to have a specialized team called ** "operation team" ** (even if there is another vendor who only operates), but it is quite a quarrel between people from operation and us from development. I feel that there were many. It's quite different if there is only one bridge-like person who can do both.
I will quote from the same site what methods are available to achieve DevOps.
One basic technique is to perform small updates frequently. From experience, I completely agree that ** small updates ** are easy to understand how far back when a problem is discovered. This will be incorporated in this article as well. The system design seems to be based on ** microservices (created by connecting loosely coupled functions) **. Be aware that programs (which are not compulsory) should be as short and clean as possible without depending on other classes or functions.
Achieving this technique will significantly increase the number of deployments, so to eliminate it, do the following:
The idea is to have the materials committed to version control tools automatically test and build. Is ** Jenkins ** a typical example of a tool? I have some experience of being helped by Jenkins, so I would like to include this regardless of the development method ...
It is a design method (?) That assembles one system with multiple small functions. It's hard to meet when working in an environment like the author ... Imagine creating a lot of programs that specialize in providing one function via API ... You might be able to grasp it if you actually do it.
I want to do this the most! With SES, the last update of the procedure manual passed in the first environment construction is 3 years ago or in Zara, and I always think that if Docker is introduced, it will not work or will decrease due to the difference in language version. (I don't really feel the need to do it because I'm alone this time)
This doesn't seem to have much to do with DevOps ... Every project used to log and batch performance to suggest feature fixes and investigate bugs.
Any development method is important, but it is more important than other development methods if you want to bring the development team closer to the operations team.
First of all, I want to make ** an SNS that can design and publish stickers for home appliances **. Frontend: React, Backend: I decided to make it in Python (If you follow the DevOps method, it should work even if you don't have one language) First of all, we will make it from the back end where it is easy to get an image. The programs I have designed and manufactured so far have been ** one huge system that is not REST or anything **, so the Framework was also ** mainly huge ones like Django, Spring, Struts2. ** ** This time, I will use ** Flask **, which is lightweight and has a lot of information (relatively).
pip install Flask #There is also a framework body logger
Considering calling microservices from the client side, I wanted to have an intermediate layer. That's why we created a ** intermediate layer ** responsible for routing on the client and backend.
router.py
from flask import Flask , redirect , url_for ,jsonify
app = Flask(__name__)
#Redirect to login page for first time to prompt login
@app.route('/')
def index(methods=['GET']) :
logOn = True
url = '/index' if logOn == True else '/redirect'
app.logger.info('I was redirected.')#I definitely don't need it ...
return redirect(url_for('/login'))
@app.route('/login')
def login(methods=['POST', 'GET']) :
return jsonify({'message': 'please login!'})
@app.route('/auth')
def auth(methods=['POST', 'GET']) :
return jsonify({'message': 'login OK!'})
@app.route('/userData')
def userData(methods=['POST', 'GET' , 'PUT' , 'DELETE']) :
return jsonify({'id': '1' , 'userName': 'mamoru12150927' })
@app.route('/rank')
def rank(methods=['POST', 'GET' , 'PUT' , 'DELETE']) :
return jsonify({'id': '1' , 'userName': 'No1User' })
@app.route('/trend')
def trend(methods=['POST', 'GET' , 'PUT' , 'DELETE']) :
return jsonify({'id': '1' , 'userName': 'TrendUser' })
It takes a request from the client side once and calls each backend service to process it. By repeating this, we will create one service.
How was it? DevOps makes me excited to read, so why not study with me if you like?
Next time, I'll do ** infrastructure coding ** and ** authentication process **.
Recommended Posts