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
property stonith-enabled=no | |
property no-quorum-policy=ignore | |
property default-resource-stickiness=100 | |
primitive virtual-ip-resource ocf:heartbeat:IPaddr2 params ip="192.168.4.20" nic="enp0s3" cidr_netmask="32" meta migration-threshold=2 op monitor interval=20 timeout=60 on-fail=restart | |
primitive haproxy-resource ocf:heartbeat:haproxy op monitor interval=20 timeout=60 on-fail=restart | |
colocation loc inf: virtual-ip-resource haproxy-resource | |
order ord inf: virtual-ip-resource haproxy-resource |
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
ssh debian@hapx-node01.kube.local | |
sudo crm configure | |
property stonith-enabled=no | |
property no-quorum-policy=ignore | |
property default-resource-stickiness=100 | |
primitive virtual-ip-resource ocf:heartbeat:IPaddr2 params ip="192.168.4.20" nic="enp0s3" cidr_netmask="32" meta migration-threshold=2 op monitor interval=20 timeout=60 on-fail=restart | |
primitive haproxy-resource ocf:heartbeat:haproxy op monitor interval=20 timeout=60 on-fail=restart | |
colocation loc inf: virtual-ip-resource haproxy-resource |
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
cat <<EOF > /etc/apt/sources.list | |
deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse | |
deb-src http://us.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse | |
deb http://us.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse | |
deb-src http://us.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse | |
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse | |
deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse | |
EOF |
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
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/ | |
echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list | |
rm microsoft.gpg |
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
cat <<EOF > /etc/NetworkManager/NetworkManager.conf | |
[main] | |
rc-manager=resolvconf | |
plugins=ifupdown,keyfile | |
dns=dnsmasq | |
[ifupdown] | |
managed=false | |
EOF |
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
cat <<EOF > image/isolinux/grub.cfg | |
search --set=root --file /ubuntu | |
insmod all_video | |
set default="0" | |
set timeout=30 | |
menuentry "Try Ubuntu FS without installing" { |
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 chroot chroot dpkg-query -W --showformat='${Package} ${Version}\n' | sudo tee image/casper/filesystem.manifest | |
sudo cp -v image/casper/filesystem.manifest image/casper/filesystem.manifest-desktop | |
sudo sed -i '/ubiquity/d' image/casper/filesystem.manifest-desktop | |
sudo sed -i '/casper/d' image/casper/filesystem.manifest-desktop | |
sudo sed -i '/discover/d' image/casper/filesystem.manifest-desktop |
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
import java.security.KeyManagementException; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.cert.CertificateException; | |
import java.security.cert.X509Certificate; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.HttpsURLConnection; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.SSLSession; | |
import javax.net.ssl.TrustManager; |
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
public RestTemplate restTemplate(final ClientProperties clientProperties, final List<HttpMessageConverter<?>> messageConverters) { | |
final RestTemplate restTemplate = new RestTemplate(messageConverters); | |
final List<ClientHttpRequestInterceptor> interceptors = new LinkedList<>(); | |
interceptors.add(new HeaderRequestInterceptor(restTemplate, clientProperties)); | |
final ClientHttpRequestFactory clientHttpRequestFactory = new ClientHttpRequestFactory(); | |
clientHttpRequestFactory.setOutputStreaming(false); | |
restTemplate.setInterceptors(interceptors); |
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
public class ClientHttpRequestFactory extends SimpleClientHttpRequestFactory { | |
@Override | |
protected void prepareConnection(final HttpURLConnection connection, final String httpMethod) throws IOException { | |
if (connection instanceof HttpsURLConnection) { | |
SSLCertificateValidation.disable((HttpsURLConnection) connection); | |
} | |
super.prepareConnection(connection, httpMethod); |
OlderNewer