Skip to content

Stuck getting up and running #11

Description

@nreith

I was under the impression most things would take 3 lines or less, but so far this is what I've tried without success. Please help! :-) I love what you've done so far and if I can POC it would like to see how I can leverage it for making the ops easier for data scientists.

#!/bin/bash
# k3ai installer

echo "Installing kubectl, k9s, docker, k3s, and k3ai."

# install docker
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
sudo usermod -aG docker $USER
exec $SHELL

sudo mkdir -p /etc/systemd/system/docker.service.d/
cat << EOF | sudo tee /etc/systemd/system/docker.service.d/proxy.conf
[Service]
Environment="HTTP_PROXY=${HTTPS_PROXY}"
Environment="HTTPS_PROXY=${https_proxy}"
Environment="NO_PROXY=localhost,127.0.0.1,::1,.internal.domain.com"
EOF

# install kubectl
cd /tmp
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

# install k9s
curl -LO "https://github.com/derailed/k9s/releases/download/v0.24.9/k9s_Linux_x86_64.tar.gz"
tar -xvf k9s*.tar.gz
sudo install -o root -g root -m 0755 k9s /usr/local/bin/k9s

# install k3s
#curl -sfL https://get.k3s.io | sh -
#k3s kubectl get node

# install k3ai
curl -fL "https://get.k3ai.in" -o k3ai.tar.gz
tar -xvzf k3ai.tar.gz
sudo install -o root -g root -m 0755 k3ai /usr/local/bin/k3ai

echo "DONE. You can now proceed with the init steps here:"
echo "  https://docs.k3ai.in/examples/hello-home"
echo "If the above installation or next init steps fail, ensure you have set both"
echo "  http_proxy and https_proxy variables, then rerun this script and"
echo "  they will be configured for docker."
echo "Also make sure you have performed `docker login` for dockerhub."

Then

k3ai init --local k3s
or
k3ai init --confing ~/.k3ai/config.yaml

with all the other parts except k3s commented out.

I also tried installing k3s as noted above (commented out).

I'm still getting the follow errors in output:

me@k3ai:~$ k3ai init --config .k3ai/config.yaml 
☑️       Checking requirements for local deployment...
☑️       Installing infrastructure for local deployment...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file /home/nick_reith/k3s: Is a directory
  3 24986    3   791    0     0   1557      0  0:00:16 --:--:--  0:00:16  1557
curl: (23) Failed writing body (0 != 791)
chmod: cannot access './home/me/k3s': No such file or directory
mv: cannot stat './home/me/k3s': No such file or directory
[1] 17364
☑️       Infrastructure ready, proceeding to plugins installation (if any)...
☑️       Add Plugins to local deployment...
fork/exec bin/sh: no such file or directory
fork/exec bin/sh: no such file or directory
☑️       Plugins added to local deployment...
🎉      Local deployment completed, have fun with k3ai!

To use K3ai copy the following line: 🦾
➡️  export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
Thank you again for using K3ai, don't forget to check our docs at 🗺️ https://docs.k3ai.in
nick_reith@k3ai:~$ k3ai apply jupyter-minimal
Plugin YAML content: [{https://raw.githubusercontent.com/kf5i/k3ai-plugins/main/common/jupyter/base/deployment.yaml file}], name: jupyter-minimal 
Unable to connect to the server: Service Unavailable
Unable to connect to the server: Service Unavailable
Unable to connect to the server: Service Unavailable
2021/05/12 02:33:13 Error during create: exit status 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions