Skip to content

Instantly share code, notes, and snippets.

View OtherDevOpsGene's full-sized avatar

Gene Gotimer OtherDevOpsGene

View GitHub Profile
@OtherDevOpsGene
OtherDevOpsGene / chef-stacktrace.out
Created June 24, 2020 21:41
Output from TypeError: unable to resolve type 'gid_t' using archive file on Windows 2012R2 Chef Infra Client 16.2.44
Generated at 2020-06-24 21:36:26 +0000
TypeError: archive_file[C:/Users/ggotimer/Documents/archive.zip] (unzip_archive::default line 11) had an error: TypeError: unable to resolve type 'gid_t'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/types.rb:69:in `find_type'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/library.rb:589:in `find_type'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/library.rb:265:in `block in attach_function'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/library.rb:252:in `each'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/library.rb:252:in `attach_function'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-libarchive-1.0.0/lib/ffi-libarchive/archive.rb:158:in `<module:C>'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-libarchive-1.0.0/lib/ffi-libarchive/archive.rb:4:in `<module:Archive>'
C:/opscode/chef/e
@OtherDevOpsGene
OtherDevOpsGene / docker-static.sh
Last active October 30, 2020 16:22
Host a static website by hand
cd
git clone https://github.com/OtherDevOpsGene/states-docker-demo.git states
cd states/www/html
pwd
ls
docker run --name www \
-v /home/ubuntu/states/www/html:/usr/share/nginx/html:ro \
-d -p 80:80 nginx
@OtherDevOpsGene
OtherDevOpsGene / docker-workshop.sh
Last active October 30, 2020 14:58
Script to set up workstation for the Docker workshop
#! /bin/bash
# To set up an Ubuntu system as we used in the Docker tutorial,
# copy this script the the target system and run it as root:
# sudo bash ./docker-workshop.sh
# If you want to allow username/password log in, you may need to edit /etc/ssh/sshd_config
# Change
# PasswordAuthentication no
# to
@OtherDevOpsGene
OtherDevOpsGene / run-maven.sh
Last active October 30, 2020 14:48
Docker command to compile and run the Selenium test
docker run -it --rm --name maven \
-v "$(pwd)":/usr/src/maven \
-v "$HOME/.m2":/root/.m2 \
--workdir /usr/src/maven \
--network selenium_default \
maven:3.6.3-jdk-13 \
mvn clean test -DtestUrl=http://44.55.66.77
@OtherDevOpsGene
OtherDevOpsGene / Dockerfile
Last active November 1, 2020 19:24
Smaller Dockerfile for Docker Workshop
FROM ubuntu:latest AS development
RUN apt-get update && apt-get install -y --no-install-recommends \
default-jdk-headless maven git \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/OtherDevOpsGene/helloworld.git
WORKDIR helloworld
RUN mvn clean package
FROM openjdk:alpine AS runtime
COPY --from=development /helloworld/target/helloworld-1.1.jar /
@OtherDevOpsGene
OtherDevOpsGene / Dockerfile
Last active November 1, 2020 19:25
Bigger Dockerfile for Docker Workshop
FROM ubuntu:latest
RUN apt-get update && apt-get install -y --no-install-recommends \
default-jdk-headless maven git \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/OtherDevOpsGene/helloworld.git
WORKDIR helloworld
RUN mvn clean package
CMD ["java", "-cp", "/helloworld/target/helloworld-1.1.jar", \
"com.coveros.demo.helloworld.HelloWorld"]
@OtherDevOpsGene
OtherDevOpsGene / Dockerfile
Last active November 1, 2020 19:24
Bigger Dockerfile for Docker Workshop
FROM ubuntu:latest
RUN apt-get update && apt-get install -y --no-install-recommends \
default-jdk-headless maven git \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/OtherDevOpsGene/helloworld.git
WORKDIR helloworld
RUN mvn clean package
CMD ["java", "-cp", "/helloworld/target/helloworld-1.1.jar", \
"com.coveros.demo.helloworld.HelloWorld"]
@OtherDevOpsGene
OtherDevOpsGene / Dockerfile
Created September 15, 2019 19:58
Simple Dockerfile for Docker Workshop
FROM ubuntu:latest
RUN apt-get update && apt-get install -y fortune
CMD /usr/games/fortune
# set the commiter name and email (which will match the GPG key)
git config --global user.name "Gene Gotimer"
git config --global user.email [email protected]
# only push the branch you are on, and only if the name on the remote is the same
git config --global push.default simple
# delete local copies of deleted remote branches
git config --global fetch.prune true
package com.coveros.benchmark;
import java.math.BigInteger;
import java.util.Date;
public class Prime {
private static final int certainty = 100;
public static void main(final String[] args) {