Skip to content

Instantly share code, notes, and snippets.

View Creatiwww's full-sized avatar
☮️

Vitaly Panukhin Creatiwww

☮️
View GitHub Profile
pipeline {
environment {
registry = "nexus_url/your_registry/image"
registryCredentials = 'nexus_creds'
}
agent {
node {
label 'linux-slave-with-docker'
}
}
@Creatiwww
Creatiwww / app-main.yml
Created July 8, 2020 23:30
Medium - Cloud infrastructure configuration in declarative way with version control (Ansible, GitLab, OpenStack)
---
- name: Install App
shell: echo 'hello from App host - this is mock for App installation'
@Creatiwww
Creatiwww / .gitlab-ci.yml
Last active July 8, 2020 23:06
Medium - Cloud infrastructure configuration in declarative way with version control (Ansible, GitLab, OpenStack)
image: creatiwww/centos-ansible-openstackclient:latest
services:
- docker:dind
variables:
#Selectel's OpenStack cloud rc file data
OS_AUTH_URL: https://api.selvpc.ru/identity/v3
OS_PROJECT_ID: llb9bef32f1f2211t9e6507efe77b161
OS_USER_DOMAIN_NAME: 52343
@Creatiwww
Creatiwww / Dockerfile
Created July 8, 2020 21:16
Medium - Cloud infrastructure configuration in declarative way with version control (Ansible, GitLab, OpenStack)
FROM centos:centos7
ENV PYTHON_VERSION "3.6.1"
ENV PYENV_ROOT /$HOME/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN yum -y install epel-release \
&& yum -y update \
&& yum -y install \
@Creatiwww
Creatiwww / docker-compose.yml
Last active June 19, 2020 01:05
Elasticsearch (ELK)
version: '3.0'
services:
logs_app:
build: ./logs_app/
volumes:
- filebeat_data:/var/log
filebeat:
build: ./filebeat/
FROM docker.elastic.co/logstash/logstash:7.7.0
RUN rm -f /usr/share/logstash/pipeline/logstash.conf
COPY logstash.conf /usr/share/logstash/pipeline/
CMD bin/logstash -f /usr/share/logstash/pipeline/logstash.conf
FROM docker.elastic.co/beats/filebeat:7.7.0
# Copy our custom configuration file
COPY filebeat.yml /usr/share/filebeat/filebeat.yml
USER root
RUN chown root:filebeat /usr/share/filebeat/filebeat.yml
RUN mkdir /usr/share/filebeat/dockerlogs
RUN chown -R root /usr/share/filebeat/
RUN chmod -R go-w /usr/share/filebeat/
CMD ./filebeat -e
FROM docker.elastic.co/beats/filebeat:7.7.0
# Copy our custom configuration file
COPY filebeat.yml /usr/share/filebeat/filebeat.yml
USER root
RUN chown root:filebeat /usr/share/filebeat/filebeat.yml
RUN mkdir /usr/share/filebeat/dockerlogs
RUN chown -R root /usr/share/filebeat/
RUN chmod -R go-w /usr/share/filebeat/
CMD ./filebeat -e
FROM alpine:latest
RUN touch /var/log/app.log
ADD script.sh /home/
RUN chmod +x /home/script.sh
CMD ./home/script.sh
image: creatiwww/docker-compose:latest
services:
- docker:dind
variables:
STAGE_SERVER_IP: 10.10.10.1
PROD_SERVER_IP: 10.10.10.2
STAGE_SERVER_USER: gitlab
PROD_SERVER_USER: gitlab