• Skip to main content

Uly.me

cloud engineer

  • Home
  • Archives
  • Search

new

GCP Add New Route

March 2, 2021 by Ulysses

Here’s how to add a new route in Google Cloud Platform.

gcloud compute routes create name-of-new-route \
  --destination-range=200.20.0.0/15 \
  --next-hop-gateway=default-internet-gateway \
  --project=host-project \
  --network="default" \
  --priority=900

gcloud compute routes create name-of-new-route \ --destination-range=200.20.0.0/15 \ --next-hop-gateway=default-internet-gateway \ --project=host-project \ --network="default" \ --priority=900

Filed Under: Cloud Tagged With: add, default, gateway, gcp, network, new, route

Adding New Users in Powershell

December 23, 2020 by Ulysses

Here’s an easy way to add Windows users in Powershell.

net user username 'password' /add

net user username 'password' /add

Passwords must meet requirements. While you are at it, give it Admin rights.

net localgroup Administrators username /add

net localgroup Administrators username /add

Filed Under: Windows Tagged With: admin, new, powershell, rights, users

Migrate GCP VM to another network

September 10, 2019 by Ulysses

Here are the steps how to migrate a GCP VM from one network to another. It involves recreating the instance in that network.

  1. Find the VM. Click the ‘Create Similar’ button.
  2. Select the new network. Save Network. Everything else should stay the same.
  3. Don’t click Create, but get the ‘Create Similar’ command line script only. Click Cancel after.
  4. Make sure to edit the hostname. GCP appends a ‘-1’ at the end of hostname.
  5. Edit VM to keep all disks. Delete VM. Make sure to preserve boot drive.
  6. Run the ‘Create Similar’ command line script you capture to create new VM in the new network.
  7. The new VM will be based on golden image.
  8. Stop VM. Swap new disks with old disks.
  9. Start VM.
  10. Done.

Filed Under: Cloud Tagged With: create similar, gcp, migrate, move, network, new, swap, vm

Yum Add Repo Manually

August 5, 2019 by Ulysses

Add a yum repo manually by adding a configuration file in /etc/yum.repo.d/ directory.

cd /etc/yum.repos.d/
vi newrepo

cd /etc/yum.repos.d/ vi newrepo

Add the following.

[newrepo]
name=New Repo for RHEL/ CentOS $releasever - $basearch
baseurl=http://newrepo.domain.com/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://newrepo.domain.com/RPM-GPG-KEY.txt

[newrepo] name=New Repo for RHEL/ CentOS $releasever - $basearch baseurl=http://newrepo.domain.com/centos/$releasever/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://newrepo.domain.com/RPM-GPG-KEY.txt

You may need to import the key.

rpm --import http://newrepo.domain.com/RPM-GPG-KEY.txt

rpm --import http://newrepo.domain.com/RPM-GPG-KEY.txt

Finally, test the new repo by running the following.

yum update -y
yum install new-package

yum update -y yum install new-package

Filed Under: Cloud Tagged With: 3rd party, add, new, repo, yum

  • Home
  • About
  • Contact

Copyright © 2022