Coder Social home page Coder Social logo

nd064_course_1's Introduction

nd064_course_1's People

Contributors

afuechsel avatar kgamanji avatar manojsnair avatar sudkul avatar uanjali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nd064_course_1's Issues

Go Hello World Video Instruction Update

@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.

Issue at line 7

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

RUN go build -o helloworld

Creating a README.md File

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

YAML syntax error

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

docker_build.yaml File

In this file
## MOVE THIS FILE to .github/workflows/docker-build.yaml` TO EXECUTE IT

This is a basic workflow to help you get started with Actions

name: Docker Build and Push

Controls when the action will run. Triggers the workflow on push or pull request

events but only for the master branch

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

A workflow run is made up of one or more jobs that can run sequentially or in parallel

jobs:

This workflow contains a single job called "build"

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

This is a basic workflow to help you get started with Actions

name: Docker Build and Push

Controls when the action will run. Triggers the workflow on push or pull request

events but only for the master branch

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

A workflow run is made up of one or more jobs that can run sequentially or in parallel

jobs:

This workflow contains a single job called "build"

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`

"itsdangerous" version incompatibility in techtrends

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.

Issue with Dockerfile for go-helloworld project

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"]

github branches

github action workflow files are using the master branch, they should instead be using the main branch

vb.customize ["modifyvm", :id, "--ioapic", "on"] line makes vagrant unable to start Virtual Machine on Windows 10

Enviroment:

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

Synops

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

Proposed resolution

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.