정말 간만에 해보는 git 설치.

거기에다가 windows 10 환경은 정말 정말 오랜만이다.

 

 

1. Homepage

   - 모든 시작은 홈페이지

   - https://git-scm.com/

 

2. Download & Install

   - 홈페이지에서 친절하게 알맞은 아이를 추천해준다.

   - 오른쪽 모니터 화면에 있는 `Download for Windows`를 클릭해서 다운로드 후 설치 진행하자.

   - 잘 모르겠으면 추천하는대로 `Next`를 선택하면 된다 ^^

   - 개인적인 취향으로 기본 에디터를 선택하면 되는데, 저는 `nano`를 좋아하므로... ^^

 

3. Test

   - 잘 설치되었는지 확인해보자.

   - 윈도우즈의 `cmd`를 이용해서 해도 되지만, 이왕이면 `Git Bash`로 한 번 해보자.

   - 시작 메뉴에서 `Git Bash`를 클릭하자.

   - 그리고 실행

$ git --version

 

끝~

반응형

'SCM > Git-GitHub' 카테고리의 다른 글

github.dev (Web-IDE)  (1) 2021.11.03
git switch/restore (git 새로운 명령어)  (1) 2021.10.17
GitHub Copilot 처음 써보기  (0) 2021.07.26
GitHub CLI (GitHub Command line)  (0) 2020.09.20
git clone [bare/mirror] 에 대해서 알아보기  (0) 2020.01.01

 

개인적인 취향으로 Windows 환경에서

개발 비스무리한 것을 하는걸 별로 좋아하지 않지만

이번에 뭔가 해볼 일이 있어서... ^^

 

일단 Python 3.6 이상의 버전 설치가 필요하니 Go! Go! (여기에선 최신 버전은 3.9.7을 설치할 예정임!)

 

 

1. Download and Install

   - 아래 경로에 접속하면 알아서 현재 운영체제에 맞는 버전을 링크해준다.

   - https://www.python.org/downloads/

   - 다운로드 받은 후, 그냥 추천해주는대로 클릭 클릭 하면 설치 완료

 

 

2. PATH 설정

  - 설치가 완료되었지만, 제대로 사용하려면 PATH 설정을 해줘야 한다.

 

  ① 제어판

      - 시작 메뉴의 기어 모양 버튼을 통해 "제어판" 실행

 

   ② 고급 시스템 설정

      - 검색창에서 `고급 시스템 설정`을 타이핑 해서 나오는 결과를 클릭

 

   ③ 환경 변수

      - 속성창에서 `환경 변수` 선택

 

   ④ 시스템 변수 - PATH

      - 하단에 있는 `시스템 변수`에서 `PATH` 항목 찾으면 된다.

 

   ⑤ PATH - 새로만들기

      - `새로만들기`로 추가하면 된다.

      - 21-10-02 기준 Python 3.9.7 에서는 아래 경로였다. (2개 추가해야 한다)

      - 물론 사용자 명칭은 각자 환경에 따라서...

C:\Users\<사용자>\AppData\Local\Programs\Python\Python39\
C:\Users\<사용자>\AppData\Local\Programs\Python\Python39\Scripts

 

3. 동작 테스트

   - 잘 되었는지 테스트 해보자 ~

 

   - 시작 메뉴에서 `cmd`라고 타이핑을 한 뒤, `명령 프롬프트` 클릭

 

   - 명령어를 넣어보고 그림과 같은 결과가 나오면 성공이다.

> python --version

> pip --version

   - 위 2개 명령어만 잘되면 된다 ^^

 

반응형

 

 

Kubernetes 설치를 해보자 한다.

 

 

Master Node & Worker Node 각 1대씩 구성을 하고자 한다.

 

물리적으로 분리된 BareMetal 구성을 하려고 했지만,

자유로운 설정을 통해 학습해보기 위해서 VirtualBox로 우선 진행해 보았다.

 

 

정말 훌륭한 레퍼런스는 아래 링크와 같다 !!!

  - https://medium.com/finda-tech/overview-8d169b2a54ff

 

 

 

 

1. Master & Worker Node H/W

 

  - Prerequisite

 

구분  CPU Memory Storage 
 Master 2 core 3 GB 30 GB
 Worker 2 core 2 GB 30 GB

 

  - VirtualBox

 

구분  CPU Memory Storage 
 Master 2 core 4 GB 50 GB
 Worker 2 core 4 GB 50 GB

 

    . 네트워크는 NAT가 아니라 Bridge로 잡아줬다. (공유기 환경)

 

 

 

 

 

2. Master & Worker Node S/W

 

  - Ubuntu 20.04 LTS Server 설치를 하면서, 기본적인 환경 설치는 아래 링크와 동일하게 구성하였다.

    . https://www.whatwant.com/entry/notebook-ubuntu-server

 

  - Docker 까지는 미리 설치해두었다. 설치 방법은 아래 링크와 같이 진행하였다.

    . https://www.whatwant.com/entry/Docker-Install-Ubuntu-Server-2004

 

    . kubernetes validated versions이 따로 있으니 이것에 맞추는 것을 추천한다.

 

 

 

 

3. Swap off

 

  - kubelet에서 swap을 지원하지 않기 때문에, Master/Worker 모두 swap 기능을 꺼야 한다.

 

$ sudo swapoff -a

 

  - 영구적으로 기능을 끄기 위해서는 추가 작업도 해줘야 한다.

 

$ sudo nano /etc/fstab

 

  - swap 부분을 찾아서 주석 처리 해주면 된다.

 

#/swap.img  none    swap    sw  0   0

 

 

 

 

4. cgroup driver 설정

 

  - 이미 설치된 docker에 대해서 cgroup driver를 변경해줘야 한다.

 

$ docker info

 

 

  - 지금은 "cgroupfs"로 설정되어 있는 것을 볼 수 있다. "systemd"로 변경해보자.

 

$ sudo nano /etc/docker/daemon.json

 

{

    "exec-opts": ["native.cgroupdriver=systemd"],

    "log-driver": "json-file",

    "log-opts": {

        "max-size": "100m"

    },

    "storage-driver": "overlay2"

}

 

$ sudo mkdir -p /etc/systemd/system/docker.service.d

 

$ sudo systemctl daemon-reload

 

$ sudo systemctl restart docker

 

 

  - "cgroup driver"가 잘 변경된 것을 볼 수 있다.

 

 

 

 

5. Kubernetes 기본 패키지 설치

 

  - Master/Worker Node 모두 [ kubeadm, kubelet, kubectl ] 3개의 패키지가 설치되어야 한다.

    . 부수적으로 [ kubernetes-cni, cri-tools ] 2개 패키지도 필요하다.

 

  - 아래에서 최신 버전의 주소(파일명) 확인 (16.04 이후 버전 모두 동일)

    . https://packages.cloud.google.com/apt/dists/kubernetes-xenial/main/binary-amd64/Packages

 

$ wget https://packages.cloud.google.com/apt/pool/cri-tools_1.13.0-01_amd64_4ff4588f5589826775f4a3bebd95aec5b9fb591ba8fb89a62845ffa8efe8cf22.deb

 

$ wget https://packages.cloud.google.com/apt/pool/kubeadm_1.20.1-00_amd64_7cd8d4021bb251862b755ed9c240091a532b89e6c796d58c3fdea7c9a72b878f.deb

 

$ wget https://packages.cloud.google.com/apt/pool/kubectl_1.20.1-00_amd64_b927311062e6a4610d9ac3bc8560457ab23fbd697a3052c394a1d7cc9e46a17d.deb

 

$ wget https://packages.cloud.google.com/apt/pool/kubelet_1.20.1-00_amd64_560a52294b8b339e0ca8ddbc480218e93ebb01daef0446887803815bcd0c41eb.deb

 

$ wget https://packages.cloud.google.com/apt/pool/kubernetes-cni_0.8.7-00_amd64_ca2303ea0eecadf379c65bad855f9ad7c95c16502c0e7b3d50edcb53403c500f.deb

 

  - 설치도 진행하자

 

$ sudo apt-get install socat conntrack ebtables

 

$ sudo dpkg --install ./kubernetes-cni_0.8.7-00_amd64_ca2303ea0eecadf379c65bad855f9ad7c95c16502c0e7b3d50edcb53403c500f.deb

 

$ sudo dpkg --install ./kubelet_1.20.1-00_amd64_560a52294b8b339e0ca8ddbc480218e93ebb01daef0446887803815bcd0c41eb.deb

 

$ sudo dpkg --install ./cri-tools_1.13.0-01_amd64_4ff4588f5589826775f4a3bebd95aec5b9fb591ba8fb89a62845ffa8efe8cf22.deb

 

$ sudo dpkg --install ./kubectl_1.20.1-00_amd64_b927311062e6a4610d9ac3bc8560457ab23fbd697a3052c394a1d7cc9e46a17d.deb

 

$ sudo dpkg --install ./kubeadm_1.20.1-00_amd64_7cd8d4021bb251862b755ed9c240091a532b89e6c796d58c3fdea7c9a72b878f.deb

 

 

 

 

6. Master Node 셋업

 

  - kubeadm을 이용하여 Master Node 셋업을 진행하자.

 

  - Master Node의 IP를 확인하자

 

$ ifconfig

 

  - 이제 셋업 시작~!! (뒤의 IP는 방금 확인한 IP로 교체!!)

 

$ sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=192.168.100.119

 

❯ sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=192.168.100.119

[init] Using Kubernetes version: v1.20.1

[preflight] Running pre-flight checks

[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.1. Latest validated version: 19.03

[preflight] Pulling images required for setting up a Kubernetes cluster

[preflight] This might take a minute or two, depending on the speed of your internet connection

[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'

[certs] Using certificateDir folder "/etc/kubernetes/pki"

[certs] Generating "ca" certificate and key

[certs] Generating "apiserver" certificate and key

[certs] apiserver serving cert is signed for DNS names [kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local master-stg] and IPs [10.96.0.1 192.168.100.119]

[certs] Generating "apiserver-kubelet-client" certificate and key

[certs] Generating "front-proxy-ca" certificate and key

[certs] Generating "front-proxy-client" certificate and key

[certs] Generating "etcd/ca" certificate and key

[certs] Generating "etcd/server" certificate and key

[certs] etcd/server serving cert is signed for DNS names [localhost master-stg] and IPs [192.168.100.119 127.0.0.1 ::1]

[certs] Generating "etcd/peer" certificate and key

[certs] etcd/peer serving cert is signed for DNS names [localhost master-stg] and IPs [192.168.100.119 127.0.0.1 ::1]

[certs] Generating "etcd/healthcheck-client" certificate and key

[certs] Generating "apiserver-etcd-client" certificate and key

[certs] Generating "sa" key and public key

[kubeconfig] Using kubeconfig folder "/etc/kubernetes"

[kubeconfig] Writing "admin.conf" kubeconfig file

[kubeconfig] Writing "kubelet.conf" kubeconfig file

[kubeconfig] Writing "controller-manager.conf" kubeconfig file

[kubeconfig] Writing "scheduler.conf" kubeconfig file

[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"

[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"

[kubelet-start] Starting the kubelet

[control-plane] Using manifest folder "/etc/kubernetes/manifests"

[control-plane] Creating static Pod manifest for "kube-apiserver"

[control-plane] Creating static Pod manifest for "kube-controller-manager"

[control-plane] Creating static Pod manifest for "kube-scheduler"

[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"

[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s

[apiclient] All control plane components are healthy after 13.002889 seconds

[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace

[kubelet] Creating a ConfigMap "kubelet-config-1.20" in namespace kube-system with the configuration for the kubelets in the cluster

[upload-certs] Skipping phase. Please see --upload-certs

[mark-control-plane] Marking the node master-stg as control-plane by adding the labels "node-role.kubernetes.io/master=''" and "node-role.kubernetes.io/control-plane='' (deprecated)"

[mark-control-plane] Marking the node master-stg as control-plane by adding the taints [node-role.kubernetes.io/master:NoSchedule]

[bootstrap-token] Using token: t4tcwj.22xh9lzstu56qyrb

[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles

[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to get nodes

[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials

[bootstrap-token] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token

[bootstrap-token] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster

[bootstrap-token] Creating the "cluster-info" ConfigMap in the "kube-public" namespace

[kubelet-finalize] Updating "/etc/kubernetes/kubelet.conf" to point to a rotatable kubelet client certificate and key

[addons] Applied essential addon: CoreDNS

[addons] Applied essential addon: kube-proxy

 

Your Kubernetes control-plane has initialized successfully!

 

To start using your cluster, you need to run the following as a regular user:

 

  mkdir -p $HOME/.kube

  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config

  sudo chown $(id -u):$(id -g) $HOME/.kube/config

 

Alternatively, if you are the root user, you can run:

 

  export KUBECONFIG=/etc/kubernetes/admin.conf

 

You should now deploy a pod network to the cluster.

Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:

  https://kubernetes.io/docs/concepts/cluster-administration/addons/

 

Then you can join any number of worker nodes by running the following on each as root:

 

kubeadm join 192.168.100.119:6443 --token t4tcwj.22xh9lzstu56qyrb \

    --discovery-token-ca-cert-hash sha256:eb3765b58c9140c9a89daf7ea21444ca44a142939ebb93aedad1ebc03202a1d7

 

  - 사용자 계정에서 kubectl 실행을 위해 위의 가이드 내용 그대로 진행을 해보자.

 

$ mkdir -p $HOME/.kube

 

$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config

 

$ sudo chown $(id -u):$(id -g) $HOME/.kube/config

 

  - 잘 설치가 된 것을 확인해보자.

 

$ kubectl get pods --all-namespaces

 

$ kubectl get nodes

 

 

 

  - Pod Network 환경을 맞춰야 하는데, k8s 를 위한 layer 3 환경을 구축해주는 flannel을 사용해보겠다.

    . https://github.com/coreos/flannel/

 

$ kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

 

 

  - coredns가 pending에서 running으로 바뀌었고, flannel이 추가 되었고, Master Node가 Ready 상태가 된 것을 볼 수 있다.

 

 
 
7. Worker Node 셋업
 
  - 기본 환경 설치를 모두 했다면, 아래 명령어만 실행하면 된다.
  - 아래 명령어는 Master Node 설치할 때 나왔던 가이드 밑에 있는 부분 그대로 하면 된다. (각자의 환경에 따라서 실행할 것!!!)
 
$ sudo kubeadm join 192.168.100.119:6443 --token t4tcwj.22xh9lzstu56qyrb \
    --discovery-token-ca-cert-hash sha256:eb3765b58c9140c9a89daf7ea21444ca44a142939ebb93aedad1ebc03202a1d7
 
❯ sudo kubeadm join 192.168.100.119:6443 --token t4tcwj.22xh9lzstu56qyrb \
    --discovery-token-ca-cert-hash sha256:eb3765b58c9140c9a89daf7ea21444ca44a142939ebb93aedad1ebc03202a1d7
 
[preflight] Running pre-flight checks
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.1. Latest validated version: 19.03
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Starting the kubelet
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
 
This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.
 
Run 'kubectl get nodes' on the control-plane to see this node join the cluster.
 
  - Master Node에서 잘 붙었는지 확인해보자.
 
$ kubectl get nodes
 

 

 
 
 
 
 
8. hello kubernetes
 
  - Master Node에서 다음과 같이 deployment를 실행해보자.
 
$ kubectl create deployment kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1
 
  - 잘 되었는지 확인도 해보자.
 
$ kubectl get deployments
 
$ kubectl get pods -o wide
 

 

  - Worker Node에서 해당 서비스가 잘 되는지 확인해보자.

 

$ curl http://10.244.1.2:8080

 

 

 

 

 

 

여기까지~

 

 

반응형


오래된 노트북으로 서버 한 대를 셋팅하던 중, Docker를 설치하는 과정을 기록해보려 한다.



공식 홈페이지 가이드를 따라서 진행했다.

- https://docs.docker.com/engine/installation/linux/ubuntu/



※ 이 블로그를 계속 봐오신 분들은 아시겠지만... 아래 내용은 직접 실행해보면서 작성한 것입니다.



1. Ubuntu version

    - Ubuntu Focal 20.04 (LTS)


❯ lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 20.04.1 LTS

Release: 20.04

Codename: focal


❯ uname -a  

Linux whatwant 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux



2. Binary 확인

    - 웹으로 다운로드 받을 버전을 확인하자.


https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/



3. Download 받기


$ wget https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/containerd.io_1.4.3-1_amd64.deb

$ wget https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/docker-ce-cli_20.10.1~3-0~ubuntu-focal_amd64.deb

$ wget https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/docker-ce_20.10.1~3-0~ubuntu-focal_amd64.deb



4. Docker 설치하기


$ sudo dpkg --install ./containerd.io_1.4.3-1_amd64.deb

$ sudo dpkg --install ./docker-ce-cli_20.10.1~3-0~ubuntu-focal_amd64.deb

$ sudo dpkg --install ./docker-ce_20.10.1~3-0~ubuntu-focal_amd64.deb



5. sudo 없이 실행하기


$ sudo usermod -aG docker $USER


  - 로그아웃 후 재로그인해야 적용



6. Hello World


$ docker run hello-world

Unable to find image 'hello-world:latest' locally

latest: Pulling from library/hello-world

0e03bdcc26d7: Pull complete 

Digest: sha256:1a523af650137b8accdaed439c17d684df61ee4d74feac151b5b337bd29e7eec

Status: Downloaded newer image for hello-world:latest


Hello from Docker!

This message shows that your installation appears to be working correctly.


To generate this message, Docker took the following steps:

 1. The Docker client contacted the Docker daemon.

 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.

    (amd64)

 3. The Docker daemon created a new container from that image which runs the

    executable that produces the output you are currently reading.

 4. The Docker daemon streamed that output to the Docker client, which sent it

    to your terminal.


To try something more ambitious, you can run an Ubuntu container with:

 $ docker run -it ubuntu bash


Share images, automate workflows, and more with a free Docker ID:

 https://hub.docker.com/


For more examples and ideas, visit:

 https://docs.docker.com/get-started/



끝~



반응형


Node.js를 사용할 일이 있어서 빠르게 찾아봤다.



Reference: https://github.com/nodesource/distributions/blob/master/README.md#debinstall




1. PPA 등록


    - curl도 싫어하고 ppa 등록하는 것도 싫어하지만...


> curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -




2. nodejs 설치


    - 이제 그냥 설치하면 된다.


❯ sudo apt install -y nodejs




3. Test


    - 잘 되는지 직접 해보자.


> nano ./server.js


var http = require('http');

var os = require('os');


var host = os.hostname();

var handleRequest = function(request, response) {

    console.log('Received request for URL: ' + request.url);

    response.writeHead(200);

    response.end('Server is running on: ' + host);

};


var www = http.createServer(handleRequest);

www.listen(8080);


> nodejs ./server.js


    - 웹브라우저로 살펴보자.




잘 된다!!!



반응형



Minikube를 가지고 놀고 싶은데,

내 PC를 지저분하게 만들기가 싫어서...


최애하는 VirtualBox에 Ubuntu 설치해놓고

그 안에 Minikube를 설치해보고자 한다.



Reference: https://kubernetes.io/ko/docs/tasks/tools/install-minikube/



작업환경

    - Host OS: Windows 10

    - VirtualBox v6.1.12 r139181 (Qt5.6.2)

    - Guest OS: Ubuntu 18.04 Desktop

        . 2 CPU, 8192 Memory




1. 가상화 환경?!


    - "가상화 지원 여부를 확인"하란다. 현재 작업하고 있는 PC가 AMD라서 좀 찝찝한데...

    - VirtualBox의 Guest 환경에서 아래와 같이 "네스티드 VT-x/AMD-V 사용하기(V)"에 체크를 해주었다.




    - 뭔가 나오니까 된 것 같다.


❯ grep -E --color 'vmx|svm' /proc/cpuinfo

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch ssbd vmmcall fsgsbase avx2 clflushopt arat nrip_save flushbyasid decodeassists

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch ssbd vmmcall fsgsbase avx2 clflushopt arat nrip_save flushbyasid decodeassists




2. VirtualBox 설치 ?


    - VirtualBox in VirtualBox ??? 뭔가 이상하지만... 훌륭한 우리 VirtualBox는 이게 된다.


❯ sudo apt install -y virtualbox virtualbox-ext-pack




3. kubectl 설치


    - 제일 먼저 할 것은 현재 최신 버전이 뭔지 확인하는 것이다.


https://storage.googleapis.com/kubernetes-release/release/stable.txt


    - 지금 확인해본 결과는 v1.18.8 이었다.

    - 다운로드 받자. (다운로드 받는 경로나 wget을 사용하는 것은 개인적인 


> cd /srv/install/kubectl


> wget https://storage.googleapis.com/kubernetes-release/release/v1.18.1/bin/linux/amd64/kubectl


    - 설치하자


❯ chmod +x ./kubectl 


❯ sudo cp ./kubectl /usr/local/bin/kubectl


    - 잘 설치되었는지 확인해보자.


❯ kubectl version --client


Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.1", GitCommit:"7879fc12a63337efff607952a323df90cdc7a335", GitTreeState:"clean", BuildDate:"2020-04-08T17:38:50Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}




4. Minikube 설치


    - 다운로드 받아보자


> cd /srv/install/minikube


> wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 -O minikube


    - 설치하자


❯ chmod +x ./minikube 


❯ sudo install minikube /usr/local/bin





5. Minikube 실행


    - 실행은 엄청 쉽다


❯ minikube start





6. dashboard


    - minikube는 대시보드도 간단히 제공해준다.


❯ minikube dashboard


🔌  대시보드를 활성화하는 중 ...

🤔  Verifying dashboard health ...

🚀  프록시를 시작하는 중 ...

🤔  Verifying proxy health ...

🎉  Opening http://127.0.0.1:40647/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/ in your default browser...

[7090:7090:0822/025314.671219:ERROR:viz_main_impl.cc(150)] Exiting GPU process due to errors during initialization


    - 알아서 Chrome이 뜬다. (아! 개인적인 취향으로 VirtualBox에 Ubuntu 설치하자마자 Chrome을 미리 설치해놨다)





7. docker 설치


    - minikube를 가지고 놀기 위해서는 docker가 필요하다.


❯ sudo apt install -y docker.io


    - 현재 사용자 계정으로 docker를 실행할 수 있도록 하자


❯ sudo usermod -aG docker $USER


❯ newgrp docker


    - 현재 계정을 docker 그룹에 넣어도 바로 적용되지 않는다. 재부팅하기 귀찮아서 newgrp으로 지금 docker 그룹에 속한 것처럼 해버렸다.


    - 잘 설치되었는지 실행해보자. Permission 에러가 안나오면 된다.


❯ docker ps -a


CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES



가지고 노는 것은 다음 기회에~

반응형



Flutter 공식 사이트는 아래와 같다.

   - https://flutter.dev/



친절하게도 한글 사이트도 있다. 비교적 고퀄리티의 한글 번역이다!!!

   - https://flutter-ko.dev/



구글링으로 선배님(?)들이 먼저 설치해본 결과를 찾아서 따라하려다가

직접 공식 사이트에 있는 설치 방법을 따라해보기로 마음먹었다.





Flutter는 Windows/macOS/Linux 환경을 모두 지원한다.



습관처럼 Linux 환경에서 설치하는 것으로 하려다가

이번에는 그냥 한 번 Windows 환경에서 설치해보기로 마음을 바꿨다.


이유는... 없다. 그냥...



1. System requirements


   - 뭐 당연히 Windows 7 SP1 이상이어야 하고  설치할 하드 공간도 400MB 이상 필요하고... 뭐, 블라블라...


   ① PowerShell 5.0 이상


      - Windows10 사용하고, 최신 업데이트를 했다고 하면 당연히 맞출 수 있는 조건일텐데...

      - 버전 확인은 아래와 같이 할 수 있다.



     - 시작 메뉴를 통해 "powershell"을 찾아서 실행한 뒤에



     - "$PSVersionTable" 명령어를 실행하면 위와 같이 version을 확인할 수 있다.


   ② Git


     - Git도 미리 설치해놓아야 한다고 한다.


     - 아래 사이트를 통해 Git for WIndows 패키지를 설치하면 된다.

        . https://git-scm.com/



     - Git Bash 실행해서 "git --version"으로 확인해보자.




2. Install Flutter SDK


   - Flutter SDK를 다운로드 받아서 설치하면 되는데... 이왕이면 Git을 이용해서 해보겠다.



   - 위 내용을 보면 알겠지만... 보통 Application을 설치하는 "C:\Program Files\" 경로는 사용하지 말란다.



   - "C:\src" 디렉토리를 만든 다음에

   - "git clone https://github.com/flutter/flutter.git -b stable" 명령어를 이용해 Flutter SDK를 받아오면 된다.




3. Set Path


   - flutter를 막 실행하기 위해 PATH를 설정해보자



   - '시스템 속성'에서 '환경 변수' 부분을 찾으면 된다.

   - '환경 변수'에서 '시스템 변수'에 있는 'Path'를 찾아서 편집을 누르면...



   - 방금 설치(? 다운로드?)한 flutter의 bin 디렉토리를 추가해주면 된다.



   - Git Bash를 종료한 뒤에 다시 실행하고, "flutter --version"을 실행해보자.


   - 뭔가 오류처럼 나오는건 git bash 에서 실행해서 그렇다.




   - PowerShell에서 실행을 하면 갑자기 뭔가를 설치하고선 version 정보를 보여준다.




4. Doctor


   - flutter를 실행하기 위한 환경이 잘 갖춰져 있는지 검사를 해주는 기능이 있다.



   - "flutter doctor"를 실행하면 검사를 하게 되는데... 이런... Android Studio가 결국은 필요하다.



5. Android Studio


   - 아래 사이트에 접속해서 Download 및 설치를 진행하자

      . https://developer.android.com/studio/index.html



   - 설치 잘하고 나면 열심히 환경 설정을 해줘야 한다.



   - Configure의 "SDK Manager"를 선택하자


   - "SDK Tools" 탭 선택 후 오른쪽 하단에 있는 "Hide ..." 체크를 해제하면 나오는 "Android SDK Tools (Obsolete)"를 설치하자



   - 나중에 스마트폰 연결을 위해 "Google USB Driver"로 설치하자.


   - 스마트폰에서는 "Developer options"와 "USB debugging"을 열어줘야 한다.

      . Note8 에서는 설정-휴대전화 정보-소프트웨어 정보-빌드 번호 (7번 이상 연타) -> 개발자 모드

      . Note8 에서는 설정-개발자 옵션 -> USB Debugging On



6. Emulator


   - 에뮬레이터를 실행하기 위한 환경 설정을 해보자.



   - Configure에서 "AVD Manager"를 선택하자.



   - 가상 디바이스를 생성하는 것이다.



   - 원하는 디바이스를 고르면 된다



   - 가상 디바이스에 설치할 Android 버전을 골라서 Download 해주면 된다.


   - 그런데, 오른쪽에 Intel HAXM이 설치 안되었다고 나오는데... 필자는 AMD이다보니 설치에 애를 먹어서...


   - 그냥 드럽고 치사해서 실제 Device 물려서 테스트하기로 했다 !!!




7. Plugin


   - Android Studio에서 Flutter를 원활하게 사용하기 위해서는 그에 맞는 plugin을 설치해야 한다.



   - Plugins 메뉴를 통해서 설치할 수 있다.



   - flutter로 검색하면 바로 나온다. 설치하자.


   - 설치가 끝나면 IDE를 재시작할거냐고 물어본다. 그에 응하자~





8. Test App


   - 잘 되는지 한 번 해보자.



   - 위 화면의 두번째 항목을 선택하자 "Start a new Flutter project"



   - Flutter Application 으로 만들어보자.



   - 두번째 항목인 Flutter SDK Path는 앞에서 설치한 아이의 경로로 잡아주면 된다.


   - 아니면 새로운 경로로 설치를 해도 된다.



   - 개인적으로 뭐가 뭔지 아직은 잘 모르겠어서... 그냥 무조건 Go! Go!



   - 스마트폰을 연결하면 위와 같이 Target으로 등장하고, Run 시키면 빌드해서 폰에 앱 설치 후 실행까지 짠~ 하고 된다.




   - "+" 버튼을 누르면 숫자가 올라간다~





간단한 줄 알았는데... 뭔가 한 참 진행을 해야했지만, 스마트폰에 뭔가 짠~하고 뜨니 기분은 좋다~!!


반응형


이번에 회사 업무 때문에 간만에 서버 OS 설치가 필요한 상황이 되어서,

집에서 미리 한 번 해보면서 기록을 해보고자 한다.


1. Image Download

http://releases.ubuntu.com/18.04/



(option) 2. for Virtualbox (VirtualBox Extension Pack)


$ sudo apt install virtualbox-guest-dkms linux-headers-virtual

$ sudo mkdir -p /media/cdrom

$ sudo mount /dev/cdrom /media/cdrom

$ cd /media/cdrom

$ sudo ./VBoxLinuxAdditions.run



3. Language Pack


$ sudo apt-get install language-pack-ko

$ sudo locale-gen ko_KR.UTF-8

$ sudo dpkg-reconfigure locales

$ sudo update-locale LANG=ko_KR.UTF-8 LC_MESSAGES=POSIX



4. Timezone


$ sudo timedatectl

$ sudo timedatectl list-timezones | grep Seoul

$ sudo timedatectl set-timezone Asia/Seoul

$ sudo timedatectl

$ date



(option) 5. nano


$ nano ~/.nanorc


set tabsize 4

set tabstospaces



6. set time


$ sudo apt-get install ntpdate

$ sudo ntpdate time.windows.com



(option) 7. remove cloud-init


    - 설치하고 부팅을 하면 로그인 화면에서 자꾸 걸리적거리는 cloud-init 관련 메시지... 삭제해버리고 싶어서 했다.

    - cloud-init 정체는 아래 링크에서 확인

        . https://access.redhat.com/documentation/ko-kr/red_hat_virtualization/4.1/html/virtual_machine_management_guide/sect-using_cloud-init_to_automate_the_configuration_of_virtual_machines

    - 이하 내용은 다음 링크를 100% 참고했다.

        . https://nucco.org/2018/05/ubuntu-18-04-chronicles-removing-cloud-init.html


$ sudo dpkg-reconfigure cloud-init


제일 하단의 None 항목 빼고 나머지 전부 선택을 해제


$ sudo apt-get purge cloud-init


$ sudo rm -rf /etc/cloud/

$ sudo rm -rf /var/lib/cloud/


또는,


$ sudo mv /etc/cloud /srv/remove/cloud-init/etc-cloud

$ sudo mv /var/lib/cloud/ /srv/remove/cloud-init/var-lib-cloud


반응형

+ Recent posts