mirror of
https://github.com/hoshikawa2/Weblogic_Market_Place_OCI.git
synced 2026-03-06 10:11:01 +00:00
adjustments
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
# Starter pipeline
|
||||
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
||||
# Add steps that build, run tests, deploy, and more:
|
||||
# https://aka.ms/yaml
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- script: |
|
||||
sudo apt update
|
||||
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
|
||||
wget https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tgz
|
||||
tar -xf Python-3.11.9.tgz
|
||||
cd Python-3.11.9
|
||||
./configure --enable-optimizations
|
||||
sudo make altinstall
|
||||
python3.11 -m venv oracle-cli
|
||||
source oracle-cli/bin/activate
|
||||
wget https://github.com/oracle/oci-cli/releases/download/v3.40.0/oci-cli-3.40.0.zip
|
||||
unzip oci-cli-3.40.0.zip
|
||||
cd oci-cli
|
||||
pip install oci_cli-*-py2.py3-none-any.whl
|
||||
|
||||
##sudo bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"
|
||||
|
||||
mkdir /home/vsts/.oci
|
||||
echo '[DEFAULT]' >> /home/vsts/.oci/config
|
||||
echo 'user=ocid1.user.oc1..aaaaaaaa5qt6x2bhe3pqawphnt75xtdpmntisfgxeizqsol4f3kxmlcmphda' >> /home/vsts/.oci/config
|
||||
echo 'fingerprint=34:36:4e:62:0c:c3:1f:80:5b:b0:18:80:d5:e9:73:1c' >> /home/vsts/.oci/config
|
||||
echo 'key_file=/home/vsts/.oci/oci_api_key.pem' >> /home/vsts/.oci/config
|
||||
echo 'tenancy=ocid1.tenancy.oc1..aaaaaaaarmf64ufoolro2kzrupzyazqycjapqsyacn7rju64jyw4zbyb6j6q' >> /home/vsts/.oci/config
|
||||
echo 'region=us-ashburn-1' >> /home/vsts/.oci/config
|
||||
|
||||
cd /home/vsts/.oci/
|
||||
wget -O oci_api_key.pem https://www.dropbox.com/scl/fi/3yjruq1imww3nkzvgby4v/oci_api_key.pem
|
||||
|
||||
sudo chmod 600 /home/vsts/.oci/oci_api_key.pem
|
||||
oci resource-manager job create-destroy-job --execution-plan-strategy AUTO_APPROVED --stack-id ocid1.ormstack.oc1.iad.amaaaaaaihuwreyaoaanscej56cowg2smdsrt5esdpz4uq7otrbyenyrnz7a
|
||||
|
||||
displayName: 'Destroying Terraform Resource Manager Stack'
|
||||
59
files/azure-pipelines.yml
Normal file
59
files/azure-pipelines.yml
Normal file
@@ -0,0 +1,59 @@
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
|
||||
variables:
|
||||
buildConfiguration: 'Release'
|
||||
imageName: 'oraclequote_azure:latest'
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
pwd
|
||||
docker build --no-cache -f Dockerfile -t $(ocir)/$(tenancy)/$(repo)/$(imageName) .
|
||||
displayName: 'Building Docker Image'
|
||||
|
||||
- script: |
|
||||
docker login https://$(ocir) -u $(dockerUser) -p "$(dockerPassword)"
|
||||
docker push $(ocir)/$(tenancy)/$(repo)/$(imageName)
|
||||
displayName: 'Sending Image to OCIR'
|
||||
|
||||
- script: |
|
||||
pip install oci-cli
|
||||
displayName: 'OCI CLI Installing'
|
||||
|
||||
- script: |
|
||||
mkdir /home/vsts/.kube
|
||||
|
||||
mkdir /home/vsts/.oci
|
||||
cd /home/vsts/.oci
|
||||
# Obtain your OCI User Private Key
|
||||
# wget -O oci_api_key.pem https://----your_bucket_url-----/oci_api_key.pem
|
||||
wget -O oci_api_key.pem https://----your_bucket_url-----/oci_api_key.pem
|
||||
sudo chmod 600 /home/vsts/.oci/oci_api_key.pem
|
||||
|
||||
echo '[DEFAULT]' > /home/vsts/.oci/config
|
||||
echo 'user=ocid1.user.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' >> /home/vsts/.oci/config
|
||||
echo 'fingerprint=a0:6c:fe:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx' >> /home/vsts/.oci/config
|
||||
echo 'key_file=/home/vsts/.oci/oci_api_key.pem' >> /home/vsts/.oci/config
|
||||
echo 'tenancy=ocid1.tenancy.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' >> /home/vsts/.oci/config
|
||||
echo 'region=us-ashburn-1' >> /home/vsts/.oci/config
|
||||
chmod 600 /home/vsts/.oci/config
|
||||
displayName: 'OCI CLI Configuration'
|
||||
|
||||
- script: |
|
||||
oci resource-manager job create-apply-job --execution-plan-strategy AUTO_APPROVED --stack-id ocid1.ormstack.oc1.iad.amaaaaaaamaaaaaaamaaaaaaamaaaaaaamaaaaaaamaaaaaaamaaaaaaamaaaaaa
|
||||
displayName: 'Weblogic Terraform Resource Manager'
|
||||
|
||||
- script: |
|
||||
oci ce cluster create-kubeconfig --cluster-id ocid1.cluster.oc1.iad.aaaaaaaaamaaaaaaamaaaaaaamaaaaaaamaaaaaaamaaaaaaamaaaaaaamaaaaaa --file /home/vsts/.kube/config --region us-ashburn-1 --token-version 2.0.0 --kube-endpoint PUBLIC_ENDPOINT
|
||||
|
||||
export KUBECONFIG=/home/vsts/.kube/config
|
||||
|
||||
cd /home/vsts/work/1/s
|
||||
kubectl config view
|
||||
kubectl get nodes
|
||||
kubectl replace -f kubernetes.yaml --force
|
||||
sleep 120
|
||||
kubectl get services callpdfreport-service
|
||||
kubectl get pods
|
||||
kubectl describe pods
|
||||
displayName: 'Deploying to OKE'
|
||||
Reference in New Issue
Block a user