diff --git a/scripts/steampipe_iac/org_README.md b/scripts/steampipe_iac/org_README.md new file mode 100644 index 0000000..3879ab8 --- /dev/null +++ b/scripts/steampipe_iac/org_README.md @@ -0,0 +1,11 @@ +# dsk-iac +aws 환경 구축 시 사용하는 파일을 정리한다. + +## directory 구조 +1. __docs: 문서파일 저장. +2. architecture : aws 구성도 +3. kops: aws kubernetes cluster 구성 +4. packer: aws ami 생성 +5. script: lambda 실행, key 배포 등 스크립트 +6. terraform: terraform code + diff --git a/scripts/steampipe-iac.sh b/scripts/steampipe_iac/steampipe-iac.sh similarity index 95% rename from scripts/steampipe-iac.sh rename to scripts/steampipe_iac/steampipe-iac.sh index 3165955..5ca7b45 100755 --- a/scripts/steampipe-iac.sh +++ b/scripts/steampipe_iac/steampipe-iac.sh @@ -7,7 +7,10 @@ __init (){ pwd git pull - cat ${origin} > ${file} + + datetime=`date "+%Y.%m.%d %H:%M:%S"` + echo -e "*기준 시간 : ${datetime}\n" > ${file} + cat ${origin} >> ${file} } #------------------------------------------------------------------------------------------------------ __git_push (){ @@ -100,18 +103,18 @@ select name, namespace, type, - lower(p ->> 'nodePort') as \"Node Port\", + lower(p ->> 'nodePort') as Node_Port, age(current_timestamp, creation_timestamp) from kubernetes_service, jsonb_array_elements(ports) as p where type='NodePort' and name not like '%rel-%' order by - \"Node Port\" + Node_Port """ #------------------------------------------------------------------------------------------------------ git_path="/home/jhjung/git/dsk-iac" -origin="/home/jhjung/git/org_README.md" +origin="$(pwd)/org_README.md" exec_log="${git_path}/query.log" file="README.md" #------------------------------------------------------------------------------------------------------