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
#!/bin/bash | |
export uuid=$(uuidgen) | |
echo "$uuid" >> outfile.txt | |
#sed -i "s/node.id=$uuid/node.id=$uuid/g" hello.txt | |
sed -i "s/#node.id=__uuidgen__/node.id=$uuid/g" node.properties | |
cat ./node.properties |
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
sudo apt-get install ssh | |
sudo apt-get install rsync | |
sudo apt install openssh-client | |
sudo apt install openssh-server | |
ssh localhost | |
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa | |
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
FROM node:10 AS ui-build | |
WORKDIR /usr/src/app | |
COPY WebApp/ ./WebApp/ | |
RUN cd WebApp && npm install @angular/cli && npm install && npm run build | |
FROM node:10 AS server-build | |
WORKDIR /root/ | |
COPY --from=ui-build /usr/src/app/WebApp/dist ./WebApp/dist | |
COPY package*.json ./ | |
RUN npm install |
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
FROM node:10 | |
# set the work directory | |
WORKDIR /usr/src/app | |
# copy package.json | |
COPY package*.json ./ | |
# copy webapp folder | |
COPY WebApp/package*.json ./WebApp/ |
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
#Create resource group in azure to keep all the resources. | |
ResourceGroupName="PrestoResourceGroup" | |
Location="eastus" | |
Subscription="Azure-Subscription-Name" | |
az group create --name $ResourceGroupName --location $Location --subscription $Subscription | |
#Create vnet and 2 VMs one for Presto coordinator and one for Presto worker | |
CoordinatorName="presto-coordinator-vm" | |
WorkerName="presto-worker-vm" |
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
# Install wget | |
sudo yum install -y wget | |
# Setup Presto | |
sudo mkdir -m757 -p /var/presto/data | |
cd /usr/lib/ | |
sudo wget https://repo1.maven.org/maven2/io/prestosql/presto-server/325/presto-server-325.tar.gz | |
sudo tar xvzf presto-server-325.tar.gz | |
sudo mv presto-server-325 presto | |
sudo rm presto-server-325.tar.gz |
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
# De-allocate and generalize the VMs in order to create an image. | |
# A VM that has been generalized can no longer be restarted. | |
ResourceGroupName="PrestoResourceGroup" | |
WorkerName="presto-worker-vm" | |
ImageName="presto-worker-image" | |
Subscription="Azure-Subscription-Name" | |
az vm deallocate \ | |
--subscription $Subscription \ |
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> | |
<!-- Configuration for accessing Gen1 storage adl --> | |
<property> | |
<name>dfs.adls.oauth2.access.token.provider.type</name> | |
<value>ClientCredential</value> | |
</property> | |
<property> | |
<name>dfs.adls.oauth2.refresh.url</name> | |
<value>{Oauth2.0-endpoint}</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
@Grab(group='org.yaml', module='snakeyaml', version='1.18') | |
import jenkins.model.* | |
import hudson.model.* | |
import hudson.tasks.LogRotator | |
import hudson.plugins.git.* | |
import hudson.plugins.git.extensions.* | |
import hudson.plugins.git.extensions.impl.* | |
import org.jenkinsci.plugins.workflow.job.WorkflowJob | |
import org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition | |
import org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty |