This file contains 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
from sys import argv | |
from time import sleep | |
# Set time to first argument | |
time = argv[1] | |
# Set seconds to integer representation of time | |
seconds = int(time) | |
# Make sure time provided is greater than or equal to zero |
This file contains 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
# Build from the latest Python 3 image | |
FROM python:3 | |
# Add the scripts folder from our project to the image | |
ADD ./scripts ./scripts | |
# Run our Python script | |
CMD [ "python", "./scripts/Countdown.py" ] |
This file contains 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
# Build from the latest Python 3 Image | |
FROM python:3 | |
# Add the scripts folder from our project to the image | |
ADD ./scripts ./scripts | |
# Run our Python script | |
CMD python ./scripts/Countdown.py $TIME |
This file contains 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
FROM cassandra:3.11 | |
LABEL maintainer="awgreene" | |
RUN sed -i "s/authenticator:\ AllowAllAuthenticator/authenticator:\ PasswordAuthenticator/g" /etc/cassandra/cassandra.yaml | |
RUN sed -i "s/authorizer:\ AllowAllAuthorizer/authorizer:\ org.apache.cassandra.auth.CassandraAuthorizer/g" /etc/cassandra/cassandra.yaml |
This file contains 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
test |
This file contains 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
FROM cassandra:3.11 | |
LABEL maintainer="awgreene" | |
ADD ./scripts ./scripts | |
CMD ["./scripts/cassandraInitAdmin.sh"] |
This file contains 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
# Check that all envirment variables have been set. | |
echo "CASSANDRA_IP:$CASSANDRA_IP" | |
echo "CASSANDRA_PORT:$CASSANDRA_PORT" | |
echo "CASSANDRA_ADMIN_USERNAME:$CASSANDRA_ADMIN_USERNAME" | |
echo "CASSANDRA_ADMIN_PASSWORD:$CASSANDRA_ADMIN_PASSWORD" | |
# Echo all commands for debug. | |
set -x | |
# Inject the username and password of new admin into the cql script. |
This file contains 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
CREATE USER IF NOT EXISTS <CASSANDRA_ADMIN_USERNAME> WITH PASSWORD '<CASSANDRA_ADMIN_PASSWORD>' SUPERUSER; |
This file contains 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
ALTER USER cassandra WITH PASSWORD '<RANDOM_PASSWORD>' NOSUPERUSER; |
This file contains 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
FROM cassandra:3.11 | |
LABEL maintainer="awgreene" | |
ADD ./scripts ./scripts | |
CMD ["./scripts/cassandraInitKeyspace.sh"] |
OlderNewer