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
@EnableConfigServer | |
@SpringBootApplication | |
public class ConfigServer { | |
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigServer.class); | |
public static void main(String[] args) { | |
final var context = SpringApplication.run(ConfigServer.class, args); | |
final var properties = context.getBean(BuildProperties.class); | |
LOGGER.info("[CONFIG SERVER] Config server version {}", properties.getVersion()); } |
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
1. Pull vault docker image: docker pull vault | |
2. Running vault docker container: | |
docker run --cap-add=IPC_LOCK \ | |
-e 'VAULT_DEV_ROOT_TOKEN_ID=00000000-0000-0000-0000-000000000000' \ | |
-p 8200:8200 \ | |
-v tmp/vault \ | |
--name my-vault vault | |
The IPC_LOCK capability is required for Vault to be able to lock memory and not be swapped to disk, as this behavior is enabled by default. As the instance is run for development, the ID of the initially generated root token is set to the given value. |
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
public class A2BSimulation extends Simulation { | |
private static final Iterator<Map<String, Object>> FEEDER = CoreDsl.csv("/Users/Vadzim_Kavalkou/Desktop/ids.csv").readRecords().iterator(); | |
final HttpProtocolBuilder protocol = http | |
.warmUp("https://www.google.com") | |
.baseUrl("http://localhost:8080/api/v1") | |
.acceptLanguageHeader("en-US,en;q=0.5") | |
.acceptEncodingHeader("gzip, deflate") | |
.userAgentHeader( |
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
resource "google_compute_instance" "tf-instance-1" { | |
name = "tf-instance-1" | |
machine_type = "n1-standard-2" | |
zone = "us-east1-c" | |
allow_stopping_for_update = true | |
boot_disk { | |
initialize_params { | |
image = "debian-cloud/debian-10" | |
} |
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
terraform --version | |
mkdir tfinfra | |
cd tfinfra | |
nano provider.tf | |
# provider "google" {} < should be added | |
terraform init |
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
Steps to boot up the system: | |
1. Execute docker-compose up; | |
2. Follow localhost:5601 and use admin/admin to join; |
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
variables: | |
GATEWAY: gw | |
SERVICE_1: service_1 | |
SERVICE_2: service_2 | |
SUB_PROJECT_NAME: $SUB_PROJECT_NAME | |
LIST_OF_ALL_MODULES: ${GATEWAY} ${SERVICE_1} ${SERVICE_2} | |
LIST_OF_DEPLOY_MODULES: ${SERVICE_1} ${SERVICE_2} | |
GRADLE_USER_HOME: ${CI_PROJECT_DIR}/.gradle | |
stages: |
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
apiVersion: v1 | |
data: | |
airspeed: africanOrEuropean | |
meme: testAllTheThings | |
kind: ConfigMap | |
metadata: | |
name: sample3 | |
namespace: default | |
selfLink: /api/v1/namespaces/default/configmaps/sample3 |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: dns-demo | |
spec: | |
selector: | |
name: dns-demo | |
clusterIP: None | |
ports: | |
- name: dns-demo |
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
kind: NetworkPolicy | |
apiVersion: networking.k8s.io/v1 | |
metadata: | |
name: foo-allow-to-hello | |
spec: | |
policyTypes: | |
- Egress | |
podSelector: | |
matchLabels: | |
app: foo |
NewerOlder