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
--- | |
- hosts: newnode | |
remote_user: root | |
become: yes | |
become_method: sudo | |
tasks: | |
- command: bash -c "uname -r | grep ^4." | |
register: kernelversion | |
ignore_errors: yes |
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 centos:7 | |
MAINTAINER "orion" <orion@thoughtspot.com> | |
# Steps needed to use systemd enabled docker containers. | |
# Reference: https://hub.docker.com/_/centos/ | |
ENV container docker | |
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \ | |
systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | |
rm -f /lib/systemd/system/multi-user.target.wants/*;\ | |
rm -f /etc/systemd/system/*.wants/*;\ |
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
# First, build the Ember-js project inside nodejs container | |
FROM node:6 | |
RUN mkdir -p /onebar/ui | |
RUN npm install -g ember-cli | |
RUN npm install -g bower | |
RUN echo ‘{ “allow_root”: true }’ > /root/.bowerrc | |
ADD ui/package.json /onebar/ui/package.json | |
WORKDIR /onebar/ui | |
RUN npm install | |
ADD ui/ /onebar/ui |
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 nginx | |
# Install nodejs and try to cleanup some space in a single command | |
RUN apt-get update \ | |
&& apt-get install -y curl python build-essential \ | |
&& curl -sL https://deb.nodesource.com/setup_6.x | bash — \ | |
&& apt-get install -y nodejs \ | |
&& apt-get purge -y python build-essential \ | |
&& apt autoremove -y \ | |
&& apt-get clean -y | |
RUN mkdir -p /onebar/ui |
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
""" | |
This module contains methods for generation and validation invitation tokens. | |
You should use it for implementing invitation process as following: | |
1. | |
# Create new inactive user | |
user = User.objects.create(first_name='John', last_name='Doe', email='email@example.com', is_active=False) | |
# Generate expiration token valid for two days | |
token = generate_invitation_token(user.id, 60*60*24*2) | |
# Send invitation email |
NewerOlder