본문 바로가기 메뉴 바로가기

Jacob Baek's home

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Jacob Baek's home

검색하기 폼
  • all (216)
    • private (3)
      • diary (0)
      • graduateschool (3)
      • important thing (0)
      • my project (0)
      • study (0)
    • Cloud (81)
      • Private Cloud (35)
      • Public Cloud (1)
      • Cloud Native (16)
      • Architecture&Tech (2)
      • Kubernetes (27)
    • Security (11)
      • programming (0)
      • Architecture&Tech (3)
      • System&Tools (4)
      • Cloud Native (3)
    • DevOps (27)
      • System&Tools (27)
      • Architecture&Tech (0)
    • Network (6)
      • System&Tools (5)
      • Architecture&Tech (1)
    • Storage (5)
      • Architecture&Tech (1)
      • System&Tools (4)
    • os (26)
      • Linux (24)
      • Windows (2)
      • Embedded&Mobile&Etcs (0)
    • programming (17)
      • python (1)
      • c/c++ (1)
      • Java (1)
      • kernel (0)
      • Scripts (5)
      • devtools (2)
      • protocol (1)
      • common (1)
      • sw engineering (1)
      • Web Programming (0)
      • etc (4)
    • Server (16)
      • SystemMGAuto (0)
      • WebServer (6)
      • VirtualServer (1)
      • EtcServer (9)
    • quailty assurance (4)
      • Theory (1)
      • System & Tools (3)
    • ITtech (2)
    • database (0)
    • language (0)
    • Trips (0)
    • music (0)
    • etc (2)
  • 방명록

programming/Scripts (5)
Bash shell variables looks like an array

요즘 bash로 몇몇 테스트 환경 구축을 위한 script을 만들고 있어 이중 배열형태로 데이터를 저장하고 이를 쉽게 사용하는 방법을 간단히 정리하고자 한다. 테스트 환경을 자주 만들고 지워야하는 입장에서 간단히 지울 resource group을 찾아 지우는 script이다. #!/bin/bash GROUPLIST=$(az group list --query '[].name' -o tsv) num=0; for rg in $(az group list --query '[].name' -o tsv); do num=$(expr $num + 1); echo $num $rg ; declare "rg_$num"=$rg ; done DELRGNUM=0 re='^[0-9]+$' inputnum() { echo -n "##..

programming/Scripts 2022. 12. 19. 17:50
powershell

실행예제 powershell 실행을 위해서는 set-executionpolicy 를 변경해야 한다. default로 restricted로 되어 있어 실행이 불가하다. 아래명령을 수행하여 powershell script를 수행할 수 있는 환경으로 변경한다. set-executionpolicy unrestricted https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-6 write-host를 통한 메세지 출력 $testval = 1 write-host("testval : {0}" -f $testval) https://devblogs.microsoft.c..

programming/Scripts 2019. 8. 14. 17:33
wsgi with apache

apache에서 mod_wsgi 를 통한 서비스를 하는 방법을 알아보자 우선 /etc/httpd/conf.d/01-wsgi.example.com.conf 를 생성한다.아래는 sample configuration이다. DocumentRoot /var/www/html ServerName wsgi.example.com # 아래 설정에서 마지막 argument는 full path를 넣어주는게 편하다. (향후 관리를 위해서도) WSGIScriptAlias / app.py 실제 python code는 다음과 같다.(필수적으로 application 이라는 function이 존재해야 하고 response header를 포함한 응답이 return 되어야 한다.) def application(environ, start_r..

programming/Scripts 2016. 7. 20. 21:12
parsing xml

python 에서는 다음과 같은 XML을 지원한다. SAX, DOM, ElementTree 과 같은 방식이 존재한다. 이중 ElementTree 가 python에 적합하게 구현된 방식이다. lower 2.5 (minidom) from xml.dom import minidom xmldoc = minidom.parse('sample.xml') 참고사이트 - http://wiki.python.org/moin/MiniDom over 2.5 (ElementTree) from xml.etree.ElementTree as ET # import elementtree.ElementTree as ET tree = ET.parse('sample.xml') root = tree.getroot() rootTagName = ro..

programming/Scripts 2013. 7. 12. 16:11
python for ssh

paramiko feature- paramiko는 platform에 독립적이다.- ansible에서 사용되고 있다. Linux 별 설치ubuntu 설치는 apt-get 를 통해 설치할 수 있다.- sudo apt-get install python-paramikoCentOS 설치는 아래와 같다.- sudo yum install python-paramiko 기본적인 코드는 다음과 같다. import paramiko def main(): ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect('127.0.0.1', port=22, username='test', password='test123'..

programming/Scripts 2012. 7. 20. 13:50
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
  • Postee
  • kubent(no trouble)
  • Kata Container on AKS
  • Vertical Pods Autoscaler
최근에 달린 댓글
  • 감사합니다 부족한 질문이었지만 정말 좋은 답변 감사드립⋯
  • 안녕하세요. 먼저 질문주신 내용을 제가 이해하기론 두가⋯
  • 안녕하세요 ㅎㅎ 구글에서 돌고 돌다가 선생님의 블로그까⋯
Total
141,310
Today
7
Yesterday
193
링크
  • Cyuu
TAG
  • wsl2
  • OpenStack
  • ConEmu
  • kubernetes install
  • aquasecurity
  • macvlan
  • K3S
  • jenkins
  • openstacksdk
  • socket
  • vmware openstack
  • nginx-ingress
  • openstack backup
  • kubernetes
  • minio
  • Jenkinsfile
  • Terraform
  • elasticsearch
  • galera
  • ceph
  • mattermost
  • minikube
  • hashicorp boundary
  • metallb
  • boundary ssh
  • Helm Chart
  • ansible
  • kata container
  • crashloopbackoff
  • DevSecOps
more
«   2023/03   »
일 월 화 수 목 금 토
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함
  • 2023/03 (3)
  • 2023/02 (4)
  • 2023/01 (1)
  • 2022/12 (2)
  • 2022/08 (2)

Blog is powered by Tistory / Designed by Tistory

티스토리툴바