Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
4ac6cf2
Update for setting up single node cluster
q131172019 Jul 21, 2021
f1d411a
Set up single node cluster without sudo permission
q131172019 Jul 21, 2021
b347cbb
Remove sudo from the document single-node-dev-cluster.md
q131172019 Jul 21, 2021
2ba00b0
Make the changes based on Sindica's comments
q131172019 Jul 23, 2021
1221bc4
Make the minor change in docs/setup-guide/setup-dev-env.md
q131172019 Jul 23, 2021
db68a77
Remove duplicate steps in the file setup-dev-env.md
q131172019 Jul 23, 2021
a710bad
:wq!Merge remote-tracking branch 'upstream/master' into CarlXie_singl…
q131172019 Aug 6, 2021
c696130
Update the document to set up multi-node Dev cluster in AWS
q131172019 Aug 7, 2021
e0b8173
The 2nd update the document to set up multi-node Dev cluster in AWS
q131172019 Aug 7, 2021
2ff9cd0
Merge remote-tracking branch 'upstream/master' into CarlXie_singleNod…
q131172019 Aug 11, 2021
afd22c7
Make the changes based on Sonya's feedback on PR#1122
q131172019 Aug 12, 2021
73f659e
Make the changes based on Sonya's feedback on PR#1122 / 2nd minor change
q131172019 Aug 12, 2021
4d5a8d4
Make two minor changes based on Sonya's comments on 2021-08-12
q131172019 Aug 12, 2021
e5ac974
Make one minor change based on Sonya's second feedback on 2021-08-12
q131172019 Aug 12, 2021
e5ae55a
Update the document setup-dev-env.md and fix two minor bugs in setup_…
q131172019 Aug 14, 2021
669dc8d
Merge branch 'CentaurusInfra:master' into CarlXie_singleNodeArktosClu…
q131172019 Sep 10, 2021
e859d93
Merge remote-tracking branch 'origin/master' into CarlXie_singleNodeA…
q131172019 Nov 2, 2021
08b7fd9
minor update
q131172019 Nov 2, 2021
f5eeb3b
Rename for two files
q131172019 Nov 2, 2021
038fa79
Minor update
q131172019 Nov 2, 2021
21e67f5
Rename for one file and create a new file
q131172019 Nov 2, 2021
7268842
Re-add the original file back
q131172019 Nov 2, 2021
ac5ac9c
single-node-dev-scale-up-cluster-with-Mizar.md - draft #1
q131172019 Nov 2, 2021
00726b8
single-node-dev-scale-up-cluster-with-Mizar.md - draft #1.1
q131172019 Nov 2, 2021
fdd7bfe
single-node-dev-scale-up-cluster-with-Mizar.md - draft #1.2
q131172019 Nov 2, 2021
12e8ddf
Update single-node-dev-scale-up-cluster-with-Mizar.md
q131172019 Nov 3, 2021
868155e
Update multi-node-dev-scale-up-cluster-with-Mizar.md
q131172019 Nov 4, 2021
30129a3
Update multi-node-dev-scale-up-cluster-with-Mizar.md #1
q131172019 Nov 4, 2021
00f060f
minor change: 128HB -> 128GB
q131172019 Nov 4, 2021
6c9138f
Update two documents
q131172019 Nov 4, 2021
494e743
Update two documents #1.1
q131172019 Nov 5, 2021
3184597
Update one document
q131172019 Nov 5, 2021
9b844b9
update 3 documents #1.0
q131172019 Nov 16, 2021
de4846e
update 3 documents #1.1
q131172019 Nov 16, 2021
7de5fcd
update 3 documents #1.2
q131172019 Nov 17, 2021
cdb8cd7
update 3 documents #1.3
q131172019 Nov 17, 2021
f09054c
update 3 documents #1.4
q131172019 Nov 17, 2021
4064b60
update 3 documents #1.5
q131172019 Nov 17, 2021
f18244f
update 3 documents #1.6
q131172019 Nov 17, 2021
a0019cd
update 3 documents #1.7
q131172019 Nov 17, 2021
7a3f062
update 3 documents #1.8
q131172019 Nov 17, 2021
eba99f5
update 3 documents #1.9
q131172019 Nov 17, 2021
b6f0b33
update 3 documents #1.10
q131172019 Nov 17, 2021
ea5978d
update 3 documents #1.11
q131172019 Nov 18, 2021
f200aa4
update scale-out documents #1.001
q131172019 Nov 19, 2021
79a7da6
update scale-out documents #1.002
q131172019 Nov 19, 2021
410803d
update scale-out documents #1.003
q131172019 Nov 19, 2021
f7706f6
update scale-out documents #1.004
q131172019 Nov 19, 2021
84636f5
update scale-out documents #1.005
q131172019 Nov 19, 2021
5c9d12f
update scale-out documents #1.006
q131172019 Nov 19, 2021
a3bda47
update scale-out documents #1.007
q131172019 Nov 19, 2021
c7d16be
update 3 documents #1.12
q131172019 Nov 19, 2021
ee3c1a6
update 3 documents #1.13
q131172019 Nov 21, 2021
b46f3f4
update 3 documents #1.14
q131172019 Nov 22, 2021
fb459e3
update 3 documents #1.15
q131172019 Nov 22, 2021
d6aacb9
update 3 documents #1.16
q131172019 Nov 23, 2021
e5c0420
Update document with new blog at https://msazure.club/flannel-network…
q131172019 Dec 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 13 additions & 64 deletions docs/setup-guide/setup-dev-env.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
## Set up developer environment
## Set up developer environment (updated on 2021-07-19)

Note: tested on AWS EC2 Ubuntu 16.04 x86 image.

Note: Tested on AWS EC2 Ubuntu 16.04/18.04/20.04 x86 image.

### Clone repo
```
$ mkdir -p go/src/
$ cd go/src/
$ git clone https://github.com/futurewei-cloud/arktos
$ git clone https://github.com/centaurusinfra/arktos
```

Note: the following steps can be simplified by running hack/setup-dev-node.sh
### Install needed packages (docker, make, gcc, jq and golang)
```
$ ./hack/setup-dev-node.sh
Comment thread
q131172019 marked this conversation as resolved.
Comment thread
q131172019 marked this conversation as resolved.
```

### Install Golang
### Install needed packages (docker, make, gcc, jq and golang)
```
$ sudo apt-get update
# $ sudo apt-get -y upgrade // optional
$ cd /tmp
$ wget https://dl.google.com/go/go1.12.9.linux-amd64.tar.gz
$ tar -xvf go1.12.9.linux-amd64.tar.gz
$ sudo mv go /usr/local
$ rm go1.12.9.linux-amd64.tar.gz
$ ./hack/setup-dev-node.sh
```
Add the following lines to ~/.profile

### Update your account's profile
Add the following lines into the profile
```
GOROOT=/usr/local/go
GOPATH=$HOME/go
Expand All @@ -31,54 +29,5 @@ PATH=$GOPATH/bin:$GOROOT/bin:$PATH
Update the current shell session
```
$ source ~/.profile
```

### Install gcc and make. There might be an issue to build images. It can be fixed by running "git tag -a v2.7.4"
```
$ sudo apt install build-essential
```

### Install Docker
```
# sudo apt-get update -y -q

# sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common -y -q

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# sudo apt-key fingerprint 0EBFCD88

# sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

# sudo apt-get update -y -q
# sudo apt-get install docker-ce docker-ce-cli containerd.io -y -q
# sudo gpasswd -a $USER docker
```

### Install crictl
```
$ cd /tmp
$ wget https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.17.0/crictl-v1.17.0-linux-amd64.tar.gz
# sudo tar zxvf crictl-v1.17.0-linux-amd64.tar.gz -C /usr/local/bin
$ rm -f crictl-v1.17.0-linux-amd64.tar.gz

$ touch /tmp/crictl.yaml
$ echo runtime-endpoint: unix:///run/containerd/containerd.sock >> /tmp/crictl.yaml
$ echo image-endpoint: unix:///run/containerd/containerd.sock >> /tmp/crictl.yaml
$ echo timeout: 10 >> /tmp/crictl.yaml
$ echo debug: true >> /tmp/crictl.yaml
# sudo mv /tmp/crictl.yaml /etc/crictl.yaml

# mkdir -p /etc/containerd
# sudo rm -rf /etc/containerd/config.toml
# sudo containerd config default > /tmp/config.toml
# sudo mv /tmp/config.toml /etc/containerd/config.toml
# sudo systemctl restart containerd
$ echo $PATH
```
50 changes: 50 additions & 0 deletions docs/setup-guide/single-node-dev-cluster.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# How to Setup a Dev Cluster of single node on AWS EC2 instance running Ubuntu 18.04, 16.04 and 20.04

0. Pre-requisite - setup local development environment
```
https://github.com/CentaurusInfra/arktos/blob/master/docs/setup-guide/setup-dev-env.md
```

1. Run script to create a single arktos cluster

Note: If your Dev Cluster of single node is on AWS EC2 instance running Ubuntu 20.04, please FIRST comment out the following three lines at https://github.com/CentaurusInfra/arktos/blob/master/pkg/kubelet/cm/container_manager_linux.go#L804,#L806 before running the command './hack/arktos-up.sh'.

if cpu != memory {
return "", fmt.Errorf("cpu and memory cgroup hierarchy not unified. cpu: %s, memory: %s", cpu, memory)
}

```bash
$ ./hack/arktos-up.sh
```

Note: If your Dev Cluster of single node is on AWS EC2 instance running Ubuntu 18.04, after you run the command './hack/arktos-up.sh', you may experience the following error. Just simply remove the symbolic link and re-run the command './hack/arktos-up.sh'.

ln: failed to create symbolic link '/home/ubuntu/go/src/arktos/_output/bin': File exists

```bash
$ rm -i /home/ubuntu/go/src/arktos/_output/bin
$ ./hack/arktos-up.sh
```


2. Open another terminal to use arktos cluster
```bash
$ export KUBECONFIG=/var/run/kubernetes/admin.kubeconfig
Or
Comment thread
q131172019 marked this conversation as resolved.
Outdated
$ export KUBECONFIG=/var/run/kubernetes/adminN(N=0,1,...).kubeconfig

$ cluster/kubectl.sh

Alternatively, you can write to the default kubeconfig:

$ export KUBERNETES_PROVIDER=local

$ sudo cluster/kubectl.sh config set-cluster local --server=https://ip-172-31-3-192:6443 --certificate-authority=/var/run/kubernetes/server-ca.crt
$ sudo cluster/kubectl.sh config set-credentials myself --client-key=/var/run/kubernetes/client-admin.key --client-certificate=/var/run/kubernetes/client-admin.crt
$ sudo cluster/kubectl.sh config set-context local --cluster=local --user=myself
$ sudo cluster/kubectl.sh config use-context local
$ sudo cluster/kubectl.sh config get-contexts
$ cluster/kubectl.sh
$ cluster/kubectl.sh get nodes
$ cluster/kubectl.sh get all --all-namespaces
```
11 changes: 7 additions & 4 deletions hack/arktos-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,14 @@ Alternatively, you can write to the default kubeconfig:

export KUBERNETES_PROVIDER=local

cluster/kubectl.sh config set-cluster local --server=https://${API_HOST}:${API_SECURE_PORT} --certificate-authority=${ROOT_CA_FILE}
cluster/kubectl.sh config set-credentials myself ${AUTH_ARGS}
cluster/kubectl.sh config set-context local --cluster=local --user=myself
cluster/kubectl.sh config use-context local
sudo cluster/kubectl.sh config set-cluster local --server=https://${API_HOST}:${API_SECURE_PORT} --certificate-authority=${ROOT_CA_FILE}
Comment thread
q131172019 marked this conversation as resolved.
Outdated
sudo cluster/kubectl.sh config set-credentials myself ${AUTH_ARGS}
sudo cluster/kubectl.sh config set-context local --cluster=local --user=myself
sudo cluster/kubectl.sh config use-context local
sudo cluster/kubectl.sh config get-contexts
cluster/kubectl.sh
cluster/kubectl.sh get nodes
cluster/kubectl.sh get all --all-namespaces
EOF
else
cat <<EOF
Expand Down
14 changes: 12 additions & 2 deletions hack/setup-dev-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set -o pipefail

echo "The script is to help install prerequisites of Arktos development environment"
echo "on a fresh Linux installation."
echo "It's been tested on Ubuntu 16.04 LTS and 18.04 LTS."
echo "It's been tested on Ubuntu 16.04 LTS, 18.04 and 20.04 LTS."

GOLANG_VERSION=${GOLANG_VERSION:-"1.13.9"}

Expand All @@ -42,5 +42,15 @@ wget https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz -P /tmp
sudo tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz

echo "Done."
echo "Please run and add 'export PATH=\$PATH:/usr/local/go/bin' into your shell profile."
echo ""
echo "Please add the following lines into your shell profile ~/.profile."
echo " GOROOT=/usr/local/go"
echo " GOPATH=$HOME/go"
echo " PATH=$GOPATH/bin:$GOROOT/bin:$PATH"
echo " export PATH
Comment thread
q131172019 marked this conversation as resolved.
Outdated
echo ""
echo "Update the current shell session."
echo " $ source ~/.profile"
echo " $ echo $PATH"
echo ""
echo "You can proceed to run arktos-up.sh if you want to launch a single-node cluster."
1 change: 1 addition & 0 deletions pkg/kubelet/cm/container_manager_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ func getContainer(pid int) (string, error) {
}

// since we use this container for accounting, we need to ensure its a unified hierarchy.
// Note: please comment out the following 3 lines if you want create arktos single cluster on Ubuntu 20.04 x86
Comment thread
q131172019 marked this conversation as resolved.
Outdated
if cpu != memory {
return "", fmt.Errorf("cpu and memory cgroup hierarchy not unified. cpu: %s, memory: %s", cpu, memory)
}
Expand Down