This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: UnitTest | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
unittest: | |
name: Unit Test | |
env: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gather requirements | |
FROM python:3.9.2-slim as requirements-stage | |
WORKDIR /tmp | |
COPY ./pyproject.toml ./poetry.lock /tmp/ | |
RUN apt-get update && \ | |
apt-get install -y git && \ | |
pip install poetry && \ | |
poetry export -f requirements.txt --output requirements.txt --without-hashes | |
# Final stage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright 2018 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Not good | |
resource "aws_iam_policy" "secrets_policy" { | |
name = "some_name" | |
policy = <<EOF | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": "secretsmanager:GetSecretValue", | |
"Effect": "Allow". # syntax error - dot instead of comma |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_iam_policy" "my_node_policy" { | |
name = format("node_policy_%s", var.environment) | |
policy = jsonencode({ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ec2:CreateNetworkInterface", | |
"ec2:DeleteNetworkInterface", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker-compose run --rm terraform init | |
docker-compose run --rm terraform fmt | |
docker-compose run --rm terraform validate | |
docker-compose run --rm terraform plan | |
docker-compose run --rm terraform apply | |
# useful terraform sub commands | |
terraform state list | |
terraform state show <resource> | |
terraform output #shows last output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
terraform: | |
# stdin_open: true | |
# tty: true | |
image: hashicorp/terraform:1.1.5 | |
volumes: | |
- .:/infra | |
working_dir: /infra |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Need to manually run each query now. | |
CREATE SCHEMA IF NOT EXISTS hive.iris | |
WITH (location = 's3a://iris/'); | |
-- Path s3a://iris/iris_data is the holding directory. We dont give full file path. Only parent directory | |
CREATE TABLE IF NOT EXISTS hive.iris.iris_data ( | |
sepal_length DOUBLE, | |
sepal_width DOUBLE, | |
petal_length DOUBLE, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<property> | |
<name>metastore.thrift.uris</name> | |
<value>thrift://hive-metastore:9083</value> | |
<description>Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.</description> | |
</property> | |
<property> | |
<name>metastore.task.threads.always</name> | |
<value>org.apache.hadoop.hive.metastore.events.EventCleanerTask,org.apache.hadoop.hive.metastore.MaterializationsCacheCleanerTask</value> | |
</property> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
mariadb: | |
hostname: mariadb | |
image: mariadb:10.7.1 | |
container_name: mariadb | |
ports: | |
- 3306:3306 | |
volumes: | |
- ./mariadb-data:/var/lib/mysql |
NewerOlder