Course Homepage: https://sites.google.com/udacity.com/suse-cloud-native-foundations/home
Instructor: https://github.com/kgamanji
Course Homepage: https://sites.google.com/udacity.com/suse-cloud-native-foundations/home
Instructor: https://github.com/kgamanji
Error: failed to create containerd container: get apparmor_parser version: exec: "apparmor_parser": executable file not found
Should add zypper update && zypper install apparmor-parser
to Vagrant startup bootstrap script so students can follow.
I was running into this issue with when building the Dockerfile
due to an issue related to the go.mod
file missing. Even in the solution provided it does not mention this.
❯ docker build -t go-helloworld .
[+] Building 2.8s (8/8) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 36B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/golang:alpine 2.3s
=> [1/4] FROM docker.io/library/golang:alpine@sha256:34e3951701d7cc4153ca322933ed82edf8575af0d3f5c40362dca3b3c2bc425e 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 87B 0.0s
=> CACHED [2/4] WORKDIR /go/src/app 0.0s
=> CACHED [3/4] ADD . . 0.0s
=> ERROR [4/4] RUN go build -o helloworld 0.4s
------
> [4/4] RUN go build -o helloworld:
#8 0.401 go: go.mod file not found in current directory or any parent directory; see 'go help modules'
------
executor failed running [/bin/sh -c go build -o helloworld]: exit code: 1
To fix it just add RUN go mod init
to the Dockerfile
like so:
FROM golang:alpine
WORKDIR /go/src/app
ADD . .
RUN go mod init
RUN go build -o helloworld
EXPOSE 6111
CMD ["./helloworld"]
Edition Windows 10 Home
Version 21H2
Installed on 05.02.2021
OS build 19044.1586
Experience Windows Feature Experience Pack 120.2212.4170.0
Device name DESKTOP-LO0BGQ3
Processor AMD Ryzen 5 4600H with Radeon Graphics 3.00 GHz
Installed RAM 8,00 GB (7,37 GB usable)
Device ID A1615C0C-050E-4712-A965-46001436FFD8
Product ID 00326-30000-00001-AA492
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display
The course makes the user use "vagrant up" command with pre-prepared Vagrantfile:
# set up the default terminal
ENV["TERM"]="linux"
# set minimum version for Vagrant
Vagrant.require_version ">= 2.2.10"
Vagrant.configure("2") do |config|
config.vm.provision "shell",
inline: "sudo su - && zypper update && zypper install -y apparmor-parser"
# Set the image for the vagrant box
config.vm.box = "opensuse/Leap-15.2.x86_64"
# Set the image version
config.vm.box_version = "15.2.31.632"
# Forward the ports from the guest VM to the local host machine
config.vm.network "forwarded_port", guest: 8080, host: 8080
config.vm.network "forwarded_port", guest: 6111, host: 6111
config.vm.network "forwarded_port", guest: 6112, host: 6112
# Set the static IP for the vagrant box
config.vm.network "private_network", ip: "192.168.50.4"
# Configure the parameters for VirtualBox provider
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.cpus = 4
vb.customize ["modifyvm", :id, "--ioapic", "on"]
end
end
Unfortunately, when trying to spin it up it gets stuck during waiting on SSH connection to VM:
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
It seems like the process of creating VM is getting stuck during device management setup
After deleting line:
vb.customize ["modifyvm", :id, "--ioapic", "on"]
VM starts up correctly and does not hang on SSH connection moment.
So, after modification, Vagrantfile is:
# set up the default terminal
ENV["TERM"]="linux"
# set minimum version for Vagrant
Vagrant.require_version ">= 2.2.10"
Vagrant.configure("2") do |config|
config.vm.provision "shell",
inline: "sudo su - && zypper update && zypper install -y apparmor-parser"
# Set the image for the vagrant box
config.vm.box = "opensuse/Leap-15.2.x86_64"
# Set the image version
config.vm.box_version = "15.2.31.632"
# Forward the ports from the guest VM to the local host machine
config.vm.network "forwarded_port", guest: 8080, host: 8080
config.vm.network "forwarded_port", guest: 6111, host: 6111
config.vm.network "forwarded_port", guest: 6112, host: 6112
# Set the static IP for the vagrant box
config.vm.network "private_network", ip: "192.168.50.4"
# Configure the parameters for VirtualBox provider
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.cpus = 4
end
end
contribution for the cloud challenge
There is a string concat problem, first pointed out by my VS Code editor. I tried followings, but don't work either way
YAML key: value with some example:: something else
Output key: value with some example: something else
YAML key: value with some example":" something else
It's on deployment.yaml
The targetPort
was mistakely assigned to 8111, it must be 80
#
consifure the parameters for VirtualBox provider
must be configure
Installing the python dependencies using pip3 and running the project as is throws the following exception:
» python app.py
Traceback (most recent call last):
File "app.py", line 3, in <module>
from flask import Flask, jsonify, json, render_template, request, url_for, redirect, flash
File "/usr/local/lib/python3.8/site-packages/flask/__init__.py", line 19, in <module>
from . import json
File "/usr/local/lib/python3.8/site-packages/flask/json/__init__.py", line 15, in <module>
from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.8/site-packages/itsdangerous/__init__.py)
I'm running python 3.8.12 on MacOS 11.5.2
It seems that a lot of people started getting this error this morning in their projects due to a breaking "itsdangerous" library update.
github action workflow files are using the master branch, they should instead be using the main branch
Error while build dockerfile-
[4/4] RUN go build -o helloworld:
#9 3.219 go: go.mod file not found in current directory or any parent directory; see 'go help modules'
executor failed running [/bin/sh -c go build -o helloworld]: exit code: 1
Add RUN go mod init before line 7 to resolve issue
Hi @igrigorik
As the repo's Readme file is not elaborate on how to get started with the Project.
I can write the README. if one is needed.
Please assign me this Issue.
Thanks and regards
Add exercises/.vagrant/* to .gitignore
In this file
## MOVE THIS FILE to
.github/workflows/docker-build.yaml` TO EXECUTE IT
name: Docker Build and Push
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: **your_repository**/python-helloworld:latest`
Recently in Github the branches changed from master to main
So for a successful build & push to the Docker hub change it to
## MOVE THIS FILE to
.github/workflows/docker-build.yaml` TO EXECUTE IT
name: Docker Build and Push
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: **your_repository**/python-helloworld:latest`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.