127.0.0.1 service1.cloud.com
127.0.0.1 service1
server {
listen 81;
server_name service1.cloud.com;
location / {
proxy_pass http://service_ui:8080/;
}
}
server {
listen 81;
server_name service1;
location / {
proxy_pass http://service1_ui:8181/;
}
}
FF_NETWORK_PER_BUILD: "true
integration_test:
image: $CI_REGISTRY/platform/docker-images/rpm-builder:etl-spark-python-3.6
stage: test
variables:
# KAFKA SERVICES
KAFKA_HOST: kafka
ALLOW_ANONYMOUS_LOGIN: "yes"
ALLOW_PLAINTEXT_LISTENER: "yes"
FF_NETWORK_PER_BUILD: "true
KAFKA_CFG_ZOOKEEPER_CONNECT: "zookeeper:2181"
services:
- name: $CI_REGISTRY/bitnami/zookeeper:latest
alias: zookeeper
- name: $CI_REGISTRY/bitnami/kafka:latest
alias: kafka
script:
# Copy base files for spark
- cp -ir /app/* ./
import React from "react";
import Profile from "./Profile";
import * as axios from "axios";
import {setUserProfile} from "../../redux/profile-reducer";
import {connect} from 'react-redux';
import {useParams} from "react-router-dom";
const withRouter = WrappedComponent => props => {
const params = useParams();
// etc... other react-router-dom v6 hooks
return (
<WrappedComponent
{...props}
params={params}
// etc...
/>
);
};
class ProfileContainer extends React.Component{
componentDidMount() {
// debugger;
//
console.log(this.props);
let userId = this.props.params.userId;
if (!userId){
userId=2;
}
axios.get(`https://social-network.samuraijs.com/api/1.0/profile/`+userId)
.then(response => {
// debugger;
this.props.setUserProfile(response.data);
});
}
render () {
// debugger;
return(
<Profile {...this.props} profile={this.props.profile}/>
)
}
}
let mapStateToProps = (state) => ({
profile: state.profilePage.profile
});
let WithUrlDataContainerComponent = withRouter(ProfileContainer);
export default connect(mapStateToProps, {
setUserProfile
}) (WithUrlDataContainerComponent);
<Route path="/profile" element={<ProfileContainer />}>
<Route path=":userId" element={<ProfileContainer />} />
</Route>
def template1 ="spread_sshkeys"
pipeline {
agent any
stages {
stage('Dynamic Stages') {
steps {
script {
stage("import template ${template1}"){
println("${env.STAGE_NAME}")
}
stage("run template ${template1}"){
println("${env.STAGE_NAME}")
}
}
}
}
}
}
scope = Flask(__name__, static_url_path='')
# пришлось добавить эту штуку чтобы решить проблему с blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
CORS(scope)
var x = []
var y = []
var url ='http://0.0.0.0:8228/scope/store_by_datetime?id_scope_dir=1&datetime_start=2020-10-17%2010:00&datetime_end=2020-10-17%2011:00'
var req = new XMLHttpRequest();
req.overrideMimeType("application/json");
req.open('GET', url, true);
req.onload = function() {
var jsonResponse = JSON.parse(req.responseText);
// do something with jsonResponse
console.log(jsonResponse)
console.log(jsonResponse['result'].length)
for(var k in jsonResponse['result']) {
// console.log(k, jsonResponse['result'][k]);
x.push(jsonResponse['result'][k]['date'])
y.push(jsonResponse['result'][k]['value'])
// console.log(x)
var data = [
{
x: x,
y: y,
type: 'scatter'
}
];
Plotly.newPlot('myDiv', data);
}
};
req.send(null);
fdisk -l
pvresize /dev/sdd
pvdisplay
vgdisplay
lvextend -l +100%FREE /dev/mapper/data_vg-data_lv
resize2fs /dev/mapper/data_vg-data_lv
df -h
#!/bin/sh -e
# Script to dispatch NetworkManager events
#
# Runs ifupdown scripts when NetworkManager fiddles with interfaces.
# See NetworkManager(8) for further documentation of the dispatcher events.
if [ -z "$1" ]; then
echo "$0: called with no interface" 1>&2
exit 1;
fi
# Run the right scripts
case "$2" in
vpn-up)
logger -s "HELLO THIS IS YOUR SCRIPT"
touch "/home/vpn-up.txt
#преобразования маршрутов и иные действия
set -x
;;
vpn-down)
touch "/home/vpn-down.txt"
#преобразования маршрутов и иные действия
;;
hostname|dhcp4-change|dhcp6-change)
# Do nothing
;;
*)
echo "$0: called with unknown action \`$2'" 1>&2
exit 1
;;
esac
#!/bin/bash
#
tag=$(basename "$0")
if [ "$2" = vpn-up ]; then
set -x
# Modify dns
set -x
fi |& logger -i -t "$tag"
if [ "$2" = vpn-down ]; then
# echo "vpn-down" >> /tmp/iface
fi |& logger -i -t "$tag"
compile('org.apache.hive:hive-jdbc:2.0.0')
exclude("META-INF/*.LIST","META-INF/*.SF","META-INF/*.DSA","META-INF/*.RSA")